Coverage Report

Created: 2026-01-09 07:21

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/work/fu-device-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-device-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_device_instance_flags_to_string:
20
 * @val: value, e.g. %FU_DEVICE_INSTANCE_FLAG_VISIBLE
21
 *
22
 * Converts an enumerated value to a string.
23
 *
24
 * Returns: identifier string
25
 *
26
 **/
27
gchar *
28
fu_device_instance_flags_to_string(FuDeviceInstanceFlags val)
29
0
{
30
0
    const gchar *data[6] = {0};
31
0
    guint idx = 0;
32
0
    if (val == FU_DEVICE_INSTANCE_FLAG_NONE)
33
0
        return g_strdup("none");
34
0
    if (val & FU_DEVICE_INSTANCE_FLAG_VISIBLE)
35
0
        data[idx++] = "visible";
36
0
    if (val & FU_DEVICE_INSTANCE_FLAG_QUIRKS)
37
0
        data[idx++] = "quirks";
38
0
    if (val & FU_DEVICE_INSTANCE_FLAG_GENERIC)
39
0
        data[idx++] = "generic";
40
0
    if (val & FU_DEVICE_INSTANCE_FLAG_COUNTERPART)
41
0
        data[idx++] = "counterpart";
42
0
    if (val & FU_DEVICE_INSTANCE_FLAG_DEPRECATED)
43
0
        data[idx++] = "deprecated";
44
0
    return g_strjoinv(",", (gchar **)data);
45
0
}
46