Coverage Report

Created: 2026-12-01 06:28

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/work/fu-backend-struct.c
Line
Count
Source
1
/*
2
 * This file is auto-generated, do not modify!
3
 *
4
 * SPDX-License-Identifier: LGPL-2.1-or-later
5
 */
6
7
#include "config.h"
8
9
#include <glib.h>
10
11
#include "fu-backend-struct.h"
12
13
#ifdef G_LOG_DOMAIN
14
  #undef G_LOG_DOMAIN
15
#endif
16
#define G_LOG_DOMAIN "FuStruct"
17
18
/**
19
 * fu_backend_flags_to_string:
20
 * @val: value, e.g. %FU_BACKEND_FLAG_ENABLED
21
 *
22
 * Converts an enumerated value to a string.
23
 *
24
 * Returns: identifier string
25
 *
26
 **/
27
gchar *
28
fu_backend_flags_to_string(FuBackendFlags val)
29
0
{
30
0
    const gchar *data[5] = {0};
31
0
    guint idx = 0;
32
0
    if (val == FU_BACKEND_FLAG_NONE)
33
0
        return g_strdup("none");
34
0
    if (val & FU_BACKEND_FLAG_ENABLED)
35
0
        data[idx++] = "enabled";
36
0
    if (val & FU_BACKEND_FLAG_CAN_INVALIDATE)
37
0
        data[idx++] = "can-invalidate";
38
0
    if (val & FU_BACKEND_FLAG_DONE_SETUP)
39
0
        data[idx++] = "done-setup";
40
0
    if (val & FU_BACKEND_FLAG_DONE_COLDPLUG)
41
0
        data[idx++] = "done-coldplug";
42
0
    return g_strjoinv(",", (gchar **)data);
43
0
}