• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

systemd / systemd / 15232239991

24 May 2025 08:01PM UTC coverage: 72.053% (-0.02%) from 72.07%
15232239991

push

github

web-flow
docs: add man pages for sd_device_enumerator_[new,ref,unref,unrefp] (#37586)

For #20929.

299160 of 415197 relevant lines covered (72.05%)

703671.29 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

56.0
/src/shared/kernel-config.c
1
/* SPDX-License-Identifier: LGPL-2.1-or-later */
2

3
#include "alloc-util.h"
4
#include "conf-parser.h"
5
#include "kernel-config.h"
6
#include "path-util.h"
7

8
int load_kernel_install_conf(
146✔
9
                const char *root,
10
                const char *conf_root,
11
                char **ret_machine_id,
12
                char **ret_boot_root,
13
                char **ret_layout,
14
                char **ret_initrd_generator,
15
                char **ret_uki_generator) {
16

17
        _cleanup_free_ char *machine_id = NULL, *boot_root = NULL, *layout = NULL,
×
18
                            *initrd_generator = NULL, *uki_generator = NULL;
146✔
19
        const ConfigTableItem items[] = {
146✔
20
                { NULL, "MACHINE_ID",       config_parse_string, 0, &machine_id       },
21
                { NULL, "BOOT_ROOT",        config_parse_string, 0, &boot_root        },
22
                { NULL, "layout",           config_parse_string, 0, &layout           },
23
                { NULL, "initrd_generator", config_parse_string, 0, &initrd_generator },
24
                { NULL, "uki_generator",    config_parse_string, 0, &uki_generator    },
25
                {}
26
        };
27
        int r;
146✔
28

29
        if (conf_root) {
146✔
30
                _cleanup_free_ char *conf = path_join(conf_root, "install.conf");
×
31
                if (!conf)
×
32
                        return log_oom();
×
33

34
                r = config_parse_many(
×
35
                                STRV_MAKE_CONST(conf),
×
36
                                STRV_MAKE_CONST(conf_root),
×
37
                                "install.conf.d",
38
                                /* root= */ NULL, /* $KERNEL_INSTALL_CONF_ROOT and --root are independent */
39
                                /* sections= */ NULL,
40
                                config_item_table_lookup, items,
41
                                CONFIG_PARSE_WARN,
42
                                /* userdata= */ NULL,
43
                                /* ret_stats_by_path= */ NULL,
44
                                /* ret_dropin_files= */ NULL);
45
        } else
46
                r = config_parse_standard_file_with_dropins_full(
146✔
47
                                root,
48
                                "kernel/install.conf",
49
                                /* sections= */ NULL,
50
                                config_item_table_lookup, items,
51
                                CONFIG_PARSE_WARN,
52
                                /* userdata= */ NULL,
53
                                /* ret_stats_by_path= */ NULL,
54
                                /* ret_dropin_files= */ NULL);
55
        if (r < 0 && r != -ENOENT)
146✔
56
                return r;
57

58
        if (ret_machine_id)
146✔
59
                *ret_machine_id = TAKE_PTR(machine_id);
×
60
        if (ret_boot_root)
146✔
61
                *ret_boot_root = TAKE_PTR(boot_root);
×
62
        if (ret_layout)
146✔
63
                *ret_layout = TAKE_PTR(layout);
146✔
64
        if (ret_initrd_generator)
146✔
65
                *ret_initrd_generator = TAKE_PTR(initrd_generator);
×
66
        if (ret_uki_generator)
146✔
67
                *ret_uki_generator = TAKE_PTR(uki_generator);
×
68
        return r >= 0;  /* Return 0 if we got -ENOENT above, 1 otherwise. */
146✔
69
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc