Coverage Report

Created: 2026-06-15 06:54

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/work/fwupd-security-attr-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 "fwupd-security-attr-struct.h"
12
13
#ifdef G_LOG_DOMAIN
14
  #undef G_LOG_DOMAIN
15
#endif
16
#define G_LOG_DOMAIN "FuStruct"
17
18
/**
19
 * fwupd_security_attr_flag_to_string:
20
 * @val: value, e.g. %FWUPD_SECURITY_ATTR_FLAG_SUCCESS
21
 *
22
 * Converts an enumerated value to a string.
23
 *
24
 * Returns: identifier string
25
 *
26
 * Since: 1.5.0
27
 **/
28
const gchar *
29
fwupd_security_attr_flag_to_string(FwupdSecurityAttrFlags val)
30
0
{
31
0
    if (val == FWUPD_SECURITY_ATTR_FLAG_NONE)
32
0
        return "none";
33
0
    if (val == FWUPD_SECURITY_ATTR_FLAG_SUCCESS)
34
0
        return "success";
35
0
    if (val == FWUPD_SECURITY_ATTR_FLAG_OBSOLETED)
36
0
        return "obsoleted";
37
0
    if (val == FWUPD_SECURITY_ATTR_FLAG_MISSING_DATA)
38
0
        return "missing-data";
39
0
    if (val == FWUPD_SECURITY_ATTR_FLAG_RUNTIME_UPDATES)
40
0
        return "runtime-updates";
41
0
    if (val == FWUPD_SECURITY_ATTR_FLAG_RUNTIME_ATTESTATION)
42
0
        return "runtime-attestation";
43
0
    if (val == FWUPD_SECURITY_ATTR_FLAG_RUNTIME_ISSUE)
44
0
        return "runtime-issue";
45
0
    if (val == FWUPD_SECURITY_ATTR_FLAG_ACTION_CONTACT_OEM)
46
0
        return "action-contact-oem";
47
0
    if (val == FWUPD_SECURITY_ATTR_FLAG_ACTION_CONFIG_FW)
48
0
        return "action-config-fw";
49
0
    if (val == FWUPD_SECURITY_ATTR_FLAG_ACTION_CONFIG_OS)
50
0
        return "action-config-os";
51
0
    if (val == FWUPD_SECURITY_ATTR_FLAG_CAN_FIX)
52
0
        return "can-fix";
53
0
    if (val == FWUPD_SECURITY_ATTR_FLAG_CAN_UNDO)
54
0
        return "can-undo";
55
0
    return NULL;
56
0
}
57
58
59
/**
60
 * fwupd_security_attr_result_to_string:
61
 * @val: value, e.g. %FWUPD_SECURITY_ATTR_RESULT_ENABLED
62
 *
63
 * Converts an enumerated value to a string.
64
 *
65
 * Returns: identifier string
66
 *
67
 * Since: 1.5.0
68
 **/
69
const gchar *
70
fwupd_security_attr_result_to_string(FwupdSecurityAttrResult val)
71
0
{
72
0
    if (val == FWUPD_SECURITY_ATTR_RESULT_ENABLED)
73
0
        return "enabled";
74
0
    if (val == FWUPD_SECURITY_ATTR_RESULT_NOT_ENABLED)
75
0
        return "not-enabled";
76
0
    if (val == FWUPD_SECURITY_ATTR_RESULT_VALID)
77
0
        return "valid";
78
0
    if (val == FWUPD_SECURITY_ATTR_RESULT_NOT_VALID)
79
0
        return "not-valid";
80
0
    if (val == FWUPD_SECURITY_ATTR_RESULT_LOCKED)
81
0
        return "locked";
82
0
    if (val == FWUPD_SECURITY_ATTR_RESULT_NOT_LOCKED)
83
0
        return "not-locked";
84
0
    if (val == FWUPD_SECURITY_ATTR_RESULT_ENCRYPTED)
85
0
        return "encrypted";
86
0
    if (val == FWUPD_SECURITY_ATTR_RESULT_NOT_ENCRYPTED)
87
0
        return "not-encrypted";
88
0
    if (val == FWUPD_SECURITY_ATTR_RESULT_TAINTED)
89
0
        return "tainted";
90
0
    if (val == FWUPD_SECURITY_ATTR_RESULT_NOT_TAINTED)
91
0
        return "not-tainted";
92
0
    if (val == FWUPD_SECURITY_ATTR_RESULT_FOUND)
93
0
        return "found";
94
0
    if (val == FWUPD_SECURITY_ATTR_RESULT_NOT_FOUND)
95
0
        return "not-found";
96
0
    if (val == FWUPD_SECURITY_ATTR_RESULT_SUPPORTED)
97
0
        return "supported";
98
0
    if (val == FWUPD_SECURITY_ATTR_RESULT_NOT_SUPPORTED)
99
0
        return "not-supported";
100
0
    return NULL;
101
0
}