repo
stringlengths
1
152
file
stringlengths
14
221
code
stringlengths
501
25k
file_length
int64
501
25k
avg_line_length
float64
20
99.5
max_line_length
int64
21
134
extension_type
stringclasses
2 values
null
systemd-main/src/boot/efi/vmm.c
/* SPDX-License-Identifier: LGPL-2.1-or-later */ #if defined(__i386__) || defined(__x86_64__) # include <cpuid.h> #endif #include "confidential-virt-fundamental.h" #include "device-path-util.h" #include "drivers.h" #include "efi-string.h" #include "proto/device-path.h" #include "string-util-fundamental.h" #include "...
14,078
31.971897
112
c
null
systemd-main/src/boot/efi/proto/block-io.h
/* SPDX-License-Identifier: LGPL-2.1-or-later */ #pragma once #include "efi.h" #define EFI_BLOCK_IO_PROTOCOL_GUID \ GUID_DEF(0x0964e5b21, 0x6459, 0x11d2, 0x8e, 0x39, 0x00, 0xa0, 0xc9, 0x69, 0x72, 0x3b) typedef struct EFI_BLOCK_IO_PROTOCOL EFI_BLOCK_IO_PROTOCOL; struct EFI_BLOCK_IO_PROTOCOL { uint64_t...
1,566
34.613636
93
h
null
systemd-main/src/boot/efi/proto/console-control.h
/* SPDX-License-Identifier: LGPL-2.1-or-later */ #pragma once #include "efi.h" #define EFI_CONSOLE_CONTROL_PROTOCOL_GUID \ GUID_DEF(0xf42f7782, 0x12e, 0x4c12, 0x99, 0x56, 0x49, 0xf9, 0x43, 0x4, 0xf7, 0x21) typedef enum { EfiConsoleControlScreenText, EfiConsoleControlScreenGraphics, Ef...
1,053
35.344828
90
h
null
systemd-main/src/boot/efi/proto/device-path.h
/* SPDX-License-Identifier: LGPL-2.1-or-later */ #pragma once #include "efi.h" #define EFI_DEVICE_PATH_PROTOCOL_GUID \ GUID_DEF(0x09576e91, 0x6d3f, 0x11d2, 0x8e, 0x39, 0x00, 0xa0, 0xc9, 0x69, 0x72, 0x3b) #define EFI_DEVICE_PATH_TO_TEXT_PROTOCOL_GUID \ GUID_DEF(0x8b843e20, 0x8132, 0x4852, 0x90, 0xcc, 0...
2,784
31.011494
92
h
null
systemd-main/src/boot/efi/proto/dt-fixup.h
/* SPDX-License-Identifier: LGPL-2.1-or-later */ #pragma once #include "efi.h" #define EFI_DTB_TABLE_GUID \ GUID_DEF(0xb1b621d5, 0xf19c, 0x41a5, 0x83, 0x0b, 0xd9, 0x15, 0x2c, 0x69, 0xaa, 0xe0) #define EFI_DT_FIXUP_PROTOCOL_GUID \ GUID_DEF(0xe617d64c, 0xfe08, 0x46da, 0xf4, 0xdc, 0xbb, 0xd5, 0x87, 0x0c,...
903
28.16129
92
h
null
systemd-main/src/boot/efi/proto/file-io.h
/* SPDX-License-Identifier: LGPL-2.1-or-later */ #pragma once #include "efi.h" #define EFI_SIMPLE_FILE_SYSTEM_PROTOCOL_GUID \ GUID_DEF(0x0964e5b22, 0x6459, 0x11d2, 0x8e, 0x39, 0x00, 0xa0, 0xc9, 0x69, 0x72, 0x3b) #define EFI_FILE_INFO_ID \ GUID_DEF(0x009576e92, 0x6d3f, 0x11d2, 0x8e, 0x39, 0x00, 0xa0, 0...
2,752
34.294872
93
h
null
systemd-main/src/boot/efi/proto/graphics-output.h
/* SPDX-License-Identifier: LGPL-2.1-or-later */ #pragma once #include "efi.h" #define EFI_GRAPHICS_OUTPUT_PROTOCOL_GUID \ GUID_DEF(0x9042a9de, 0x23dc, 0x4a38, 0x96, 0xfb, 0x7a, 0xde, 0xd0, 0x80, 0x51, 0x6a) typedef enum { PixelRedGreenBlueReserved8BitPerColor, PixelBlueGreenRedReserved8BitPe...
2,540
31.164557
92
h
null
systemd-main/src/boot/efi/proto/load-file.h
/* SPDX-License-Identifier: LGPL-2.1-or-later */ #pragma once #include "efi.h" #define EFI_LOAD_FILE_PROTOCOL_GUID \ GUID_DEF(0x56EC3091, 0x954C, 0x11d2, 0x8e, 0x3f, 0x00, 0xa0, 0xc9, 0x69, 0x72, 0x3b) #define EFI_LOAD_FILE2_PROTOCOL_GUID \ GUID_DEF(0x4006c0c1, 0xfcb3, 0x403e, 0x99, 0x6d, 0x4a, 0x6c, ...
767
33.909091
92
h
null
systemd-main/src/boot/efi/proto/loaded-image.h
/* SPDX-License-Identifier: LGPL-2.1-or-later */ #pragma once #include "efi.h" #define EFI_LOADED_IMAGE_PROTOCOL_GUID \ GUID_DEF(0x5B1B31A1, 0x9562, 0x11d2, 0x8E, 0x3F, 0x00, 0xA0, 0xC9, 0x69, 0x72, 0x3B) #define EFI_LOADED_IMAGE_DEVICE_PATH_PROTOCOL_GUID \ GUID_DEF(0xbc62157e, 0x3e33, 0x4fec, 0x99, 0...
977
31.6
92
h
null
systemd-main/src/boot/efi/proto/rng.h
/* SPDX-License-Identifier: LGPL-2.1-or-later */ #pragma once #include "efi.h" #define EFI_RNG_PROTOCOL_GUID \ GUID_DEF(0x3152bca5, 0xeade, 0x433d, 0x86, 0x2e, 0xc0, 0x1c, 0xdc, 0x29, 0x1f, 0x44) typedef struct EFI_RNG_PROTOCOL EFI_RNG_PROTOCOL; struct EFI_RNG_PROTOCOL { EFI_STATUS (EFIAPI *GetInfo)(...
703
32.52381
92
h
null
systemd-main/src/boot/efi/proto/security-arch.h
/* SPDX-License-Identifier: LGPL-2.1-or-later */ #pragma once #include "efi.h" #define EFI_SECURITY_ARCH_PROTOCOL_GUID \ GUID_DEF(0xA46423E3, 0x4617, 0x49f1, 0xB9, 0xFF, 0xD1, 0xBF, 0xA9, 0x11, 0x58, 0x39) #define EFI_SECURITY2_ARCH_PROTOCOL_GUID \ GUID_DEF(0x94ab2f58, 0x1438, 0x4ef1, 0x91, 0x52, 0x18...
1,203
35.484848
92
h
null
systemd-main/src/boot/efi/proto/simple-text-io.h
/* SPDX-License-Identifier: LGPL-2.1-or-later */ #pragma once #include "efi.h" #define EFI_SIMPLE_TEXT_INPUT_PROTOCOL_GUID \ GUID_DEF(0x387477c1, 0x69c7, 0x11d2, 0x8e, 0x39, 0x00, 0xa0, 0xc9, 0x69, 0x72, 0x3b) #define EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL_GUID \ GUID_DEF(0xdd9e7534, 0x7762, 0x4698, 0x8c, ...
6,923
36.836066
92
h
null
systemd-main/src/boot/efi/proto/tcg.h
/* SPDX-License-Identifier: LGPL-2.1-or-later */ #pragma once #include "efi.h" #define EFI_TCG_PROTOCOL_GUID \ GUID_DEF(0xf541796d, 0xa62e, 0x4954, 0xa7, 0x75, 0x95, 0x84, 0xf6, 0x1b, 0x9c, 0xdd) #define EFI_TCG2_PROTOCOL_GUID \ GUID_DEF(0x607f766c, 0x7455, 0x42be, 0x93, 0x0b, 0xe4, 0xd7, 0x6d, 0xb2, ...
3,471
30.279279
92
h
null
systemd-main/src/cgls/cgls.c
/* SPDX-License-Identifier: LGPL-2.1-or-later */ #include <errno.h> #include <getopt.h> #include <stdio.h> #include <unistd.h> #include "sd-bus.h" #include "alloc-util.h" #include "build.h" #include "bus-util.h" #include "cgroup-show.h" #include "cgroup-util.h" #include "fileio.h" #include "log.h" #include "main-fun...
12,355
36.442424
132
c
null
systemd-main/src/cgroups-agent/cgroups-agent.c
/* SPDX-License-Identifier: LGPL-2.1-or-later */ #include <stdlib.h> #include "fd-util.h" #include "log.h" #include "socket-util.h" int main(int argc, char *argv[]) { static const union sockaddr_union sa = { .un.sun_family = AF_UNIX, .un.sun_path = "/run/systemd/cgroups-agent...
1,399
24.454545
95
c
null
systemd-main/src/core/automount.h
/* SPDX-License-Identifier: LGPL-2.1-or-later */ #pragma once typedef struct Automount Automount; #include "unit.h" typedef enum AutomountResult { AUTOMOUNT_SUCCESS, AUTOMOUNT_FAILURE_RESOURCES, AUTOMOUNT_FAILURE_UNMOUNTED, AUTOMOUNT_FAILURE_START_LIMIT_HIT, AUTOMOUNT_FAILURE_...
1,080
22.5
67
h
null
systemd-main/src/core/bpf-devices.h
/* SPDX-License-Identifier: LGPL-2.1-or-later */ #pragma once #include <inttypes.h> #include "cgroup.h" typedef struct BPFProgram BPFProgram; int bpf_devices_cgroup_init(BPFProgram **ret, CGroupDevicePolicy policy, bool allow_list); int bpf_devices_apply_policy( BPFProgram **prog, CG...
792
35.045455
115
h
null
systemd-main/src/core/bpf-firewall.h
/* SPDX-License-Identifier: LGPL-2.1-or-later */ #pragma once #include <inttypes.h> #include "unit.h" enum { BPF_FIREWALL_UNSUPPORTED = 0, BPF_FIREWALL_SUPPORTED = 1, BPF_FIREWALL_SUPPORTED_WITH_MULTI = 2, }; int bpf_firewall_supported(void); int bpf_firewall_compile(Uni...
616
22.730769
89
h
null
systemd-main/src/core/bpf-foreign.c
/* SPDX-License-Identifier: LGPL-2.1-or-later */ #include "bpf-foreign.h" #include "bpf-program.h" #include "cgroup.h" #include "memory-util.h" #include "missing_magic.h" #include "mountpoint-util.h" #include "set.h" #include "stat-util.h" typedef struct BPFForeignKey BPFForeignKey; struct BPFForeignKey { uin...
5,172
32.374194
127
c
null
systemd-main/src/core/bpf-lsm.c
/* SPDX-License-Identifier: LGPL-2.1-or-later */ #include <errno.h> #include <fcntl.h> #include <linux/types.h> #include <sys/resource.h> #include <sys/stat.h> #include <sys/time.h> #include <sys/types.h> #include <unistd.h> #include "alloc-util.h" #include "bpf-lsm.h" #include "cgroup-util.h" #include "fd-util.h" #i...
11,676
34.819018
130
c
null
systemd-main/src/core/bpf-lsm.h
/* SPDX-License-Identifier: LGPL-2.1-or-later */ #pragma once #include "hashmap.h" typedef enum FilesystemParseFlags { FILESYSTEM_PARSE_INVERT = 1 << 0, FILESYSTEM_PARSE_ALLOW_LIST = 1 << 1, FILESYSTEM_PARSE_LOG = 1 << 2, } FilesystemParseFlags; typedef struct Unit Unit; typedef st...
977
32.724138
88
h
null
systemd-main/src/core/bpf-util.c
/* SPDX-License-Identifier: LGPL-2.1-or-later */ #include "bpf-dlopen.h" #include "bpf-util.h" #include "cgroup-util.h" #include "initrd-util.h" #include "log.h" bool cgroup_bpf_supported(void) { static int supported = -1; int r; if (supported >= 0) return supported; ...
1,095
28.621622
108
c
null
systemd-main/src/core/core-varlink.h
/* SPDX-License-Identifier: LGPL-2.1-or-later */ #pragma once #include "manager.h" int manager_varlink_init(Manager *m); void manager_varlink_done(Manager *m); /* Creates a new VarlinkServer and binds methods. Does not set up sockets or attach events. * Used for manager serialize/deserialize. */ int manager_setup_v...
637
36.529412
92
h
null
systemd-main/src/core/crash-handler.c
/* SPDX-License-Identifier: LGPL-2.1-or-later */ #include <sys/reboot.h> #include "crash-handler.h" #include "exit-status.h" #include "macro.h" #include "main.h" #include "missing_syscall.h" #include "process-util.h" #include "raw-clone.h" #include "rlimit-util.h" #include "signal-util.h" #include "terminal-util.h" #...
6,937
41.048485
129
c
null
systemd-main/src/core/dbus-job.h
/* SPDX-License-Identifier: LGPL-2.1-or-later */ #pragma once #include "sd-bus.h" #include "unit.h" #include "bus-object.h" extern const sd_bus_vtable bus_job_vtable[]; extern const BusObjectImplementation job_object; int bus_job_method_cancel(sd_bus_message *message, void *job, sd_bus_error *error); int bus_job_me...
652
30.095238
98
h
null
systemd-main/src/core/dbus-scope.h
/* SPDX-License-Identifier: LGPL-2.1-or-later */ #pragma once #include "sd-bus.h" #include "sd-bus-vtable.h" #include "scope.h" #include "unit.h" extern const sd_bus_vtable bus_scope_vtable[]; int bus_scope_set_property(Unit *u, const char *name, sd_bus_message *i, UnitWriteFlags flags, sd_bus_error *error); int bu...
536
25.85
116
h
null
systemd-main/src/core/dbus-service.h
/* SPDX-License-Identifier: LGPL-2.1-or-later */ #pragma once #include "sd-bus.h" #include "sd-bus-vtable.h" #include "unit.h" extern const sd_bus_vtable bus_service_vtable[]; int bus_service_set_property(Unit *u, const char *name, sd_bus_message *i, UnitWriteFlags flags, sd_bus_error *error); int bus_service_metho...
651
39.75
118
h
null
systemd-main/src/core/dbus-unit.h
/* SPDX-License-Identifier: LGPL-2.1-or-later */ #pragma once #include "sd-bus.h" #include "unit.h" extern const sd_bus_vtable bus_unit_vtable[]; extern const sd_bus_vtable bus_unit_cgroup_vtable[]; void bus_unit_send_change_signal(Unit *u); void bus_unit_send_pending_change_signal(Unit *u, bool including_new); int...
2,625
45.892857
132
h
null
systemd-main/src/core/dbus-util.c
/* SPDX-License-Identifier: LGPL-2.1-or-later */ #include "bus-polkit.h" #include "bus-util.h" #include "dbus-util.h" #include "escape.h" #include "parse-util.h" #include "path-util.h" #include "unit-printf.h" #include "user-util.h" #include "unit.h" int bus_property_get_triggered_unit( sd_bus *bus, ...
8,671
29.216028
133
c
null
systemd-main/src/core/dbus.h
/* SPDX-License-Identifier: LGPL-2.1-or-later */ #pragma once #include "sd-bus.h" #include "manager.h" int bus_send_pending_reload_message(Manager *m); int bus_init_private(Manager *m); int bus_init_api(Manager *m); int bus_init_system(Manager *m); void bus_done_private(Manager *m); void bus_done_api(Manager *m); ...
1,403
35.947368
125
h
null
systemd-main/src/core/device.h
/* SPDX-License-Identifier: LGPL-2.1-or-later */ #pragma once #include "unit.h" typedef struct Device Device; /* A mask specifying where we have seen the device currently. This is a bitmask because the device might show up * asynchronously from each other at various places. For example, in very common case a device...
1,848
40.088889
119
h
null
systemd-main/src/core/dynamic-user.h
/* SPDX-License-Identifier: LGPL-2.1-or-later */ #pragma once typedef struct DynamicUser DynamicUser; typedef struct DynamicCreds { /* A combination of a dynamic user and group */ DynamicUser *user; DynamicUser *group; } DynamicCreds; #include "manager.h" /* Note that this object always allo...
1,721
38.136364
117
h
null
systemd-main/src/core/efi-random.c
/* SPDX-License-Identifier: LGPL-2.1-or-later */ #include <fcntl.h> #include <unistd.h> #include "alloc-util.h" #include "chattr-util.h" #include "efi-random.h" #include "efivars.h" #include "fd-util.h" #include "fs-util.h" #include "random-util.h" #include "strv.h" void lock_down_efi_variables(void) { _clea...
1,249
34.714286
121
c
null
systemd-main/src/core/emergency-action.h
/* SPDX-License-Identifier: LGPL-2.1-or-later */ #pragma once #include <errno.h> #include "runtime-scope.h" typedef enum EmergencyAction { EMERGENCY_ACTION_NONE, EMERGENCY_ACTION_REBOOT, EMERGENCY_ACTION_REBOOT_FORCE, EMERGENCY_ACTION_REBOOT_IMMEDIATE, EMERGENCY_ACTION_POWEROF...
1,527
32.217391
96
h
null
systemd-main/src/core/fuzz-manager-serialize.c
/* SPDX-License-Identifier: LGPL-2.1-or-later */ #include <stdio.h> #include "alloc-util.h" #include "fd-util.h" #include "fuzz.h" #include "manager-serialize.h" #include "manager.h" #include "service.h" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { _cleanup_(manager_freep) Manager *m = NULL...
1,385
34.538462
88
c
null
systemd-main/src/core/fuzz-unit-file.c
/* SPDX-License-Identifier: LGPL-2.1-or-later */ #include "conf-parser.h" #include "fd-util.h" #include "fuzz.h" #include "install.h" #include "load-fragment.h" #include "manager-dump.h" #include "memstream-util.h" #include "string-util.h" #include "unit-serialize.h" #include "utf8.h" int LLVMFuzzerTestOneInput(const...
2,663
28.6
88
c
null
systemd-main/src/core/generator-setup.c
/* SPDX-License-Identifier: LGPL-2.1-or-later */ #include <unistd.h> #include "generator-setup.h" #include "macro.h" #include "mkdir-label.h" #include "rm-rf.h" int lookup_paths_mkdir_generator(LookupPaths *p) { int r, q; assert(p); if (!p->generator || !p->generator_early || !p->generator_...
1,531
24.966102
78
c
null
systemd-main/src/core/ima-setup.c
/* SPDX-License-Identifier: LGPL-2.1-or-later */ /*** Copyright © 2012 Roberto Sassu - Politecnico di Torino, Italy TORSEC group — http://security.polito.it ***/ #include <errno.h> #include <fcntl.h> #include <sys/stat.h> #include <sys/types.h> #include <unistd.h> #include "alloc-...
3,058
31.892473
122
c
null
systemd-main/src/core/job.h
/* SPDX-License-Identifier: LGPL-2.1-or-later */ #pragma once #include <stdbool.h> #include "sd-event.h" #include "list.h" #include "unit-dependency-atom.h" #include "unit-name.h" #include "unit.h" typedef struct ActivationDetails ActivationDetails; typedef struct Job Job; typedef struct JobDependency JobDependency...
8,935
34.601594
123
h
null
systemd-main/src/core/kill.c
/* SPDX-License-Identifier: LGPL-2.1-or-later */ #include "kill.h" #include "signal-util.h" #include "string-table.h" void kill_context_init(KillContext *c) { assert(c); c->kill_signal = SIGTERM; /* restart_kill_signal is unset by default and we fall back to kill_signal */ c->final_ki...
1,823
31
85
c
null
systemd-main/src/core/kill.h
/* SPDX-License-Identifier: LGPL-2.1-or-later */ #pragma once typedef struct KillContext KillContext; #include <stdbool.h> #include <stdio.h> #include "macro.h" typedef enum KillMode { /* The kill mode is a property of a unit. */ KILL_CONTROL_GROUP = 0, KILL_PROCESS, KILL_MIXED, ...
1,420
23.929825
68
h
null
systemd-main/src/core/kmod-setup.c
/* SPDX-License-Identifier: LGPL-2.1-or-later */ #include <unistd.h> #include "alloc-util.h" #include "bus-util.h" #include "capability-util.h" #include "efi-api.h" #include "fileio.h" #include "kmod-setup.h" #include "macro.h" #include "recurse-dir.h" #include "string-util.h" #include "strv.h" #include "virt.h" #if...
8,129
36.813953
118
c
null
systemd-main/src/core/load-dropin.c
/* SPDX-License-Identifier: LGPL-2.1-or-later */ #include "conf-parser.h" #include "fs-util.h" #include "load-dropin.h" #include "load-fragment.h" #include "log.h" #include "stat-util.h" #include "string-util.h" #include "strv.h" #include "unit-name.h" #include "unit.h" static int process_deps(Unit *u, UnitDependency...
4,960
36.870229
115
c
null
systemd-main/src/core/load-dropin.h
/* SPDX-License-Identifier: LGPL-2.1-or-later */ #pragma once #include "dropin.h" #include "unit.h" /* Read service data supplementary drop-in directories */ static inline int unit_find_dropin_paths(Unit *u, char ***paths) { assert(u); return unit_file_find_dropin_paths(NULL, ...
655
30.238095
80
h
null
systemd-main/src/core/load-fragment.h
/* SPDX-License-Identifier: LGPL-2.1-or-later */ #pragma once #include "conf-parser.h" #include "unit.h" /* These functions are declared in the header to make them accessible to unit tests. */ bool contains_instance_specifier_superset(const char *s); int unit_is_likely_recursive_template_dependency(Unit *u, const cha...
8,527
50.684848
96
h
null
systemd-main/src/core/manager-dump.c
/* SPDX-License-Identifier: LGPL-2.1-or-later */ #include "build.h" #include "fd-util.h" #include "fileio.h" #include "hashmap.h" #include "manager-dump.h" #include "memstream-util.h" #include "unit-serialize.h" void manager_dump_jobs(Manager *s, FILE *f, char **patterns, const char *prefix) { Job *j; ...
3,208
30.15534
110
c
null
systemd-main/src/core/mount.h
/* SPDX-License-Identifier: LGPL-2.1-or-later */ #pragma once typedef struct Mount Mount; #include "kill.h" #include "dynamic-user.h" #include "unit.h" typedef enum MountExecCommand { MOUNT_EXEC_MOUNT, MOUNT_EXEC_UNMOUNT, MOUNT_EXEC_REMOUNT, _MOUNT_EXEC_COMMAND_MAX, _MOUNT_EXE...
2,568
24.186275
112
h
null
systemd-main/src/core/namespace.h
/* SPDX-License-Identifier: LGPL-2.1-or-later */ #pragma once /*** Copyright © 2016 Djalal Harouni ***/ typedef struct NamespaceInfo NamespaceInfo; typedef struct BindMount BindMount; typedef struct TemporaryFileSystem TemporaryFileSystem; typedef struct MountImage MountImage; #include <stdbool.h> #include "disse...
5,810
30.928571
103
h
null
systemd-main/src/core/path.h
/* SPDX-License-Identifier: LGPL-2.1-or-later */ #pragma once typedef struct Path Path; typedef struct PathSpec PathSpec; typedef struct ActivationDetailsPath ActivationDetailsPath; #include "unit.h" typedef enum PathType { PATH_EXISTS, PATH_EXISTS_GLOB, PATH_DIRECTORY_NOT_EMPTY, PATH...
2,152
22.922222
85
h
null
systemd-main/src/core/restrict-ifaces.c
/* SPDX-License-Identifier: LGPL-2.1-or-later */ #include "fd-util.h" #include "restrict-ifaces.h" #include "netlink-util.h" #if BPF_FRAMEWORK /* libbpf, clang and llc compile time dependencies are satisfied */ #include "bpf-dlopen.h" #include "bpf-link.h" #include "bpf-util.h" #include "bpf/restrict_ifaces/restrict...
7,283
35.238806
132
c
null
systemd-main/src/core/restrict-ifaces.h
/* SPDX-License-Identifier: LGPL-2.1-or-later */ #pragma once #include "fdset.h" #include "unit.h" typedef struct Unit Unit; int restrict_network_interfaces_supported(void); int restrict_network_interfaces_install(Unit *u); int serialize_restrict_network_interfaces(Unit *u, FILE *f, FDSet *fds); /* Add BPF link fd...
514
29.294118
75
h
null
systemd-main/src/core/selinux-setup.c
/* SPDX-License-Identifier: LGPL-2.1-or-later */ #include <errno.h> #include <stdio.h> #include <unistd.h> #if HAVE_SELINUX #include <selinux/selinux.h> #endif #include "initrd-util.h" #include "log.h" #include "macro.h" #include "selinux-setup.h" #include "selinux-util.h" #include "string-util.h" #include "time-uti...
3,344
31.163462
108
c
null
systemd-main/src/core/show-status.c
/* SPDX-License-Identifier: LGPL-2.1-or-later */ #include <fcntl.h> #include <sys/stat.h> #include <sys/types.h> #include "alloc-util.h" #include "fd-util.h" #include "io-util.h" #include "parse-util.h" #include "show-status.h" #include "string-table.h" #include "string-util.h" #include "terminal-util.h" static cons...
4,087
30.689922
119
c
null
systemd-main/src/core/show-status.h
/* SPDX-License-Identifier: LGPL-2.1-or-later */ #pragma once #include <stdbool.h> #include "macro.h" /* Manager status */ typedef enum ShowStatus { SHOW_STATUS_NO, /* printing of status is disabled */ SHOW_STATUS_ERROR, /* only print errors */ SHOW_STATUS_AUTO, /* disable...
1,598
34.533333
108
h
null
systemd-main/src/core/slice.c
/* SPDX-License-Identifier: LGPL-2.1-or-later */ #include <errno.h> #include "alloc-util.h" #include "dbus-slice.h" #include "dbus-unit.h" #include "fd-util.h" #include "log.h" #include "serialize.h" #include "slice.h" #include "special.h" #include "string-util.h" #include "strv.h" #include "unit-name.h" #include "un...
12,717
26.350538
133
c
null
systemd-main/src/core/socket.h
/* SPDX-License-Identifier: LGPL-2.1-or-later */ #pragma once typedef struct Socket Socket; typedef struct SocketPeer SocketPeer; #include "mount.h" #include "socket-util.h" #include "unit.h" typedef enum SocketExecCommand { SOCKET_EXEC_START_PRE, SOCKET_EXEC_START_CHOWN, SOCKET_EXEC_START_PO...
5,352
25.765
80
h
null
systemd-main/src/core/swap.h
/* SPDX-License-Identifier: LGPL-2.1-or-later */ #pragma once /*** Copyright © 2010 Maarten Lankhorst ***/ #include "sd-device.h" #include "unit.h" typedef struct Swap Swap; typedef enum SwapExecCommand { SWAP_EXEC_ACTIVATE, SWAP_EXEC_DEACTIVATE, _SWAP_EXEC_COMMAND_MAX, _SWAP_EXEC_...
2,543
24.69697
68
h
null
systemd-main/src/core/timer.h
/* SPDX-License-Identifier: LGPL-2.1-or-later */ #pragma once typedef struct Timer Timer; typedef struct ActivationDetailsTimer ActivationDetailsTimer; #include "calendarspec.h" #include "unit.h" typedef enum TimerBase { TIMER_ACTIVE, TIMER_BOOT, TIMER_STARTUP, TIMER_UNIT_ACTIVE, ...
2,277
24.886364
92
h
null
systemd-main/src/core/transaction.h
/* SPDX-License-Identifier: LGPL-2.1-or-later */ #pragma once typedef struct Transaction Transaction; #include "hashmap.h" #include "job.h" #include "manager.h" #include "unit.h" struct Transaction { /* Jobs to be added */ Hashmap *jobs; /* Unit object => Job object list 1:1 */ Job *anch...
1,851
34.615385
105
h
null
systemd-main/src/core/unit-dependency-atom.c
/* SPDX-License-Identifier: LGPL-2.1-or-later */ #include "unit-dependency-atom.h" static const UnitDependencyAtom atom_map[_UNIT_DEPENDENCY_MAX] = { /* A table that maps high-level dependency types to low-level dependency "atoms". The latter actually * describe specific facets of dependency behaviou...
11,772
45.718254
109
c
null
systemd-main/src/core/unit-dependency-atom.h
/* SPDX-License-Identifier: LGPL-2.1-or-later */ #pragma once #include <errno.h> #include "unit-def.h" /* Flags that identify the various "atomic" behaviours a specific dependency type implies. Each dependency is * a combination of one or more of these flags that define what they actually entail. */ typedef enum Un...
5,812
61.505376
109
h
null
systemd-main/src/core/unit-printf.h
/* SPDX-License-Identifier: LGPL-2.1-or-later */ #pragma once #include "creds-util.h" #include "env-util.h" #include "fd-util.h" #include "fileio.h" #include "unit.h" int unit_name_printf(const Unit *u, const char* text, char **ret); int unit_full_printf_full(const Unit *u, const char *text, size_t max_length, char *...
1,078
38.962963
90
h
null
systemd-main/src/core/bpf/restrict_fs/restrict-fs-skel.h
/* SPDX-License-Identifier: LGPL-2.1-or-later */ /* The SPDX header above is actually correct in claiming this was * LGPL-2.1-or-later, because it is. Since the kernel doesn't consider that * compatible with GPL we will claim this to be GPL however, which should be * fine given that LGPL-2.1-or-later downgrades to ...
638
41.6
76
h
null
systemd-main/src/core/bpf/restrict_fs/restrict-fs.bpf.c
/* SPDX-License-Identifier: LGPL-2.1-or-later */ /* The SPDX header above is actually correct in claiming this was * LGPL-2.1-or-later, because it is. Since the kernel doesn't consider that * compatible with GPL we will claim this to be GPL however, which should be * fine given that LGPL-2.1-or-later downgrades to ...
2,744
32.072289
94
c
null
systemd-main/src/core/bpf/restrict_ifaces/restrict-ifaces-skel.h
/* SPDX-License-Identifier: LGPL-2.1-or-later */ /* The SPDX header above is actually correct in claiming this was * LGPL-2.1-or-later, because it is. Since the kernel doesn't consider that * compatible with GPL we will claim this to be GPL however, which should be * fine given that LGPL-2.1-or-later downgrades to ...
646
42.133333
76
h
null
systemd-main/src/core/bpf/restrict_ifaces/restrict-ifaces.bpf.c
/* SPDX-License-Identifier: LGPL-2.1-or-later */ /* <linux/bpf.h> must precede <bpf/bpf_helpers.h> due to integer types * in bpf helpers signatures. */ #include <linux/bpf.h> #include <bpf/bpf_helpers.h> const volatile __u8 is_allow_list = 0; /* Map containing the network interfaces indexes. * The interpretation ...
1,505
27.415094
89
c
null
systemd-main/src/core/bpf/socket_bind/socket-bind-api.bpf.h
/* SPDX-License-Identifier: LGPL-2.1-or-later */ /* The SPDX header above is actually correct in claiming this was * LGPL-2.1-or-later, because it is. Since the kernel doesn't consider that * compatible with GPL we will claim this to be GPL however, which should be * fine given that LGPL-2.1-or-later downgrades to ...
1,987
37.230769
80
h
null
systemd-main/src/core/bpf/socket_bind/socket-bind-skel.h
/* SPDX-License-Identifier: LGPL-2.1-or-later */ /* The SPDX header above is actually correct in claiming this was * LGPL-2.1-or-later, because it is. Since the kernel doesn't consider that * compatible with GPL we will claim this to be GPL however, which should be * fine given that LGPL-2.1-or-later downgrades to ...
638
41.6
76
h
null
systemd-main/src/core/bpf/socket_bind/socket-bind.bpf.c
/* SPDX-License-Identifier: LGPL-2.1-or-later */ /* The SPDX header above is actually correct in claiming this was * LGPL-2.1-or-later, because it is. Since the kernel doesn't consider that * compatible with GPL we will claim this to be GPL however, which should be * fine given that LGPL-2.1-or-later downgrades to ...
3,499
30.25
87
c
null
systemd-main/src/coredump/coredump-vacuum.c
/* SPDX-License-Identifier: LGPL-2.1-or-later */ #include <sys/statvfs.h> #include <sys/stat.h> #include <sys/types.h> #include <unistd.h> #include "alloc-util.h" #include "coredump-vacuum.h" #include "dirent-util.h" #include "fd-util.h" #include "fs-util.h" #include "hashmap.h" #include "macro.h" #include "memory-ut...
8,024
31.755102
120
c
null
systemd-main/src/cryptenroll/cryptenroll-pkcs11.c
/* SPDX-License-Identifier: LGPL-2.1-or-later */ #include "cryptenroll-pkcs11.h" #include "hexdecoct.h" #include "json.h" #include "memory-util.h" #include "openssl-util.h" #include "pkcs11-util.h" #include "random-util.h" int enroll_pkcs11( struct crypt_device *cd, const void *volume_...
4,101
39.613861
125
c
null
systemd-main/src/cryptenroll/cryptenroll-pkcs11.h
/* SPDX-License-Identifier: LGPL-2.1-or-later */ #pragma once #include <sys/types.h> #include "cryptsetup-util.h" #include "log.h" #if HAVE_P11KIT && HAVE_OPENSSL int enroll_pkcs11(struct crypt_device *cd, const void *volume_key, size_t volume_key_size, const char *uri); #else static inline int enroll_pkcs11(struct ...
547
31.235294
123
h
null
systemd-main/src/cryptenroll/cryptenroll-recovery.c
/* SPDX-License-Identifier: LGPL-2.1-or-later */ #include "cryptenroll-recovery.h" #include "glyph-util.h" #include "json.h" #include "memory-util.h" #include "qrcode-util.h" #include "recovery-key.h" #include "terminal-util.h" int enroll_recovery( struct crypt_device *cd, const void *...
3,544
33.754902
125
c
null
systemd-main/src/cryptenroll/cryptenroll.h
/* SPDX-License-Identifier: LGPL-2.1-or-later */ #pragma once #include <errno.h> typedef enum EnrollType { ENROLL_PASSWORD, ENROLL_RECOVERY, ENROLL_PKCS11, ENROLL_FIDO2, ENROLL_TPM2, _ENROLL_TYPE_MAX, _ENROLL_TYPE_INVALID = -EINVAL, } EnrollType; typedef enum U...
1,006
26.216216
89
h
null
systemd-main/src/cryptsetup/cryptsetup-keyfile.c
/* SPDX-License-Identifier: LGPL-2.1-or-later */ #include "cryptsetup-keyfile.h" #include "fileio.h" #include "path-util.h" #include "strv.h" int find_key_file( const char *key_file, char **search_path, const char *bindname, void **ret_key, ...
2,253
34.777778
119
c
null
systemd-main/src/cryptsetup/cryptsetup-pkcs11.c
/* SPDX-License-Identifier: LGPL-2.1-or-later */ #include <fcntl.h> #include <unistd.h> #include <sys/stat.h> #include <p11-kit/p11-kit.h> #include <p11-kit/uri.h> #include "alloc-util.h" #include "ask-password-api.h" #include "cryptsetup-pkcs11.h" #include "escape.h" #include "fd-util.h" #include "fileio.h" #includ...
6,516
36.454023
134
c
null
systemd-main/src/cryptsetup/cryptsetup-pkcs11.h
/* SPDX-License-Identifier: LGPL-2.1-or-later */ #pragma once #include <sys/types.h> #include "cryptsetup-util.h" #include "log.h" #include "time-util.h" #if HAVE_P11KIT int decrypt_pkcs11_key( const char *volume_name, const char *friendly_name, const char *pkcs11_uri...
1,930
28.707692
71
h
null
systemd-main/src/cryptsetup/cryptsetup-tpm2.c
/* SPDX-License-Identifier: LGPL-2.1-or-later */ #include "alloc-util.h" #include "ask-password-api.h" #include "cryptsetup-tpm2.h" #include "env-util.h" #include "fileio.h" #include "hexdecoct.h" #include "json.h" #include "parse-util.h" #include "random-util.h" #include "sha256.h" #include "tpm2-util.h" static int ...
11,712
38.976109
117
c
null
systemd-main/src/cryptsetup/cryptsetup-tpm2.h
/* SPDX-License-Identifier: LGPL-2.1-or-later */ #pragma once #include <sys/types.h> #include "ask-password-api.h" #include "cryptsetup-util.h" #include "log.h" #include "time-util.h" #include "tpm2-util.h" #if HAVE_TPM2 int acquire_tpm2_key( const char *volume_name, const char *devi...
4,189
32.52
62
h
null
systemd-main/src/cryptsetup/cryptsetup-tokens/cryptsetup-token-systemd-fido2.c
/* SPDX-License-Identifier: LGPL-2.1-or-later */ #include <errno.h> #include <libcryptsetup.h> #include <string.h> #include "cryptsetup-token.h" #include "cryptsetup-token-util.h" #include "hexdecoct.h" #include "json.h" #include "luks2-fido2.h" #include "memory-util.h" #include "version.h" #define TOKEN_NAME "syste...
8,394
37.333333
120
c
null
systemd-main/src/cryptsetup/cryptsetup-tokens/cryptsetup-token-systemd-pkcs11.c
/* SPDX-License-Identifier: LGPL-2.1-or-later */ #include <errno.h> #include <libcryptsetup.h> #include "cryptsetup-token.h" #include "cryptsetup-token-util.h" #include "hexdecoct.h" #include "json.h" #include "luks2-pkcs11.h" #include "memory-util.h" #include "pkcs11-util.h" #include "version.h" #define TOKEN_NAME ...
5,381
36.117241
120
c
null
systemd-main/src/cryptsetup/cryptsetup-tokens/cryptsetup-token-util.c
/* SPDX-License-Identifier: LGPL-2.1-or-later */ #include "cryptsetup-token-util.h" #include "string-util.h" int crypt_dump_buffer_to_hex_string( const char *buf, size_t buf_size, char **ret_dump_str) { int r; _cleanup_free_ char *dump_str = NULL; ...
1,985
26.971831
92
c
null
systemd-main/src/cryptsetup/cryptsetup-tokens/cryptsetup-token-util.h
/* SPDX-License-Identifier: LGPL-2.1-or-later */ #pragma once #include <stdbool.h> #include <stddef.h> #include <libcryptsetup.h> /* crypt_dump() internal indentation magic */ #define CRYPT_DUMP_LINE_SEP "\n\t " #define crypt_log_debug(cd, ...) crypt_logf(cd, CRYPT_LOG_DEBUG, __VA_ARGS__) #define cry...
1,352
32
81
h
null
systemd-main/src/cryptsetup/cryptsetup-tokens/cryptsetup-token.h
/* SPDX-License-Identifier: LGPL-2.1-or-later */ #pragma once /* for more information see libcryptsetup.h crypt-tokens section */ const char *cryptsetup_token_version(void); int cryptsetup_token_open(struct crypt_device *cd, int token, char **password, size_t *password_len, void *usrptr); int cryptsetup_tok...
688
33.45
73
h
null
systemd-main/src/cryptsetup/cryptsetup-tokens/luks2-fido2.c
/* SPDX-License-Identifier: LGPL-2.1-or-later */ #include <libcryptsetup.h> #include "cryptsetup-token-util.h" #include "hexdecoct.h" #include "json.h" #include "luks2-fido2.h" #include "memory-util.h" #include "strv.h" int acquire_luks2_key( struct crypt_device *cd, const char *json,...
5,562
33.987421
111
c
null
systemd-main/src/cryptsetup/cryptsetup-tokens/luks2-fido2.h
/* SPDX-License-Identifier: LGPL-2.1-or-later */ #pragma once #include "libfido2-util.h" struct crypt_device; int acquire_luks2_key( struct crypt_device *cd, const char *json, const char *device, const char *pin, char **ret_keyslot_passp...
710
27.44
53
h
null
systemd-main/src/cryptsetup/cryptsetup-tokens/luks2-pkcs11.c
/* SPDX-License-Identifier: LGPL-2.1-or-later */ #include <p11-kit/p11-kit.h> #include <p11-kit/uri.h> #include "cryptsetup-token-util.h" #include "escape.h" #include "hexdecoct.h" #include "json.h" #include "luks2-pkcs11.h" #include "memory-util.h" #include "pkcs11-util.h" #include "time-util.h" struct luks2_pkcs11...
9,260
33.047794
119
c
null
systemd-main/src/cryptsetup/cryptsetup-tokens/luks2-pkcs11.h
/* SPDX-License-Identifier: LGPL-2.1-or-later */ #pragma once struct crypt_device; int acquire_luks2_key( struct crypt_device *cd, const char *json, void *userdata, const void *pin, size_t pin_size, char **password, ...
583
25.545455
48
h
null
systemd-main/src/cryptsetup/cryptsetup-tokens/luks2-tpm2.c
/* SPDX-License-Identifier: LGPL-2.1-or-later */ #include "alloc-util.h" #include "ask-password-api.h" #include "env-util.h" #include "hexdecoct.h" #include "json.h" #include "log.h" #include "luks2-tpm2.h" #include "parse-util.h" #include "random-util.h" #include "sha256.h" #include "strv.h" #include "tpm2-util.h" i...
3,368
33.731959
98
c
null
systemd-main/src/cryptsetup/cryptsetup-tokens/luks2-tpm2.h
/* SPDX-License-Identifier: LGPL-2.1-or-later */ #pragma once #include "tpm2-util.h" struct crypt_device; int acquire_luks2_key( const char *device, uint32_t pcr_mask, uint16_t pcr_bank, const void *pubkey, size_t pubkey_size, ...
892
28.766667
48
h
null
systemd-main/src/debug-generator/debug-generator.c
/* SPDX-License-Identifier: LGPL-2.1-or-later */ #include <unistd.h> #include "alloc-util.h" #include "dropin.h" #include "generator.h" #include "initrd-util.h" #include "mkdir-label.h" #include "parse-util.h" #include "path-util.h" #include "proc-cmdline.h" #include "special.h" #include "string-util.h" #include "str...
5,762
29.983871
117
c
null
systemd-main/src/delta/delta.c
/* SPDX-License-Identifier: LGPL-2.1-or-later */ #include <errno.h> #include <getopt.h> #include <sys/prctl.h> #include <unistd.h> #include "alloc-util.h" #include "build.h" #include "chase.h" #include "dirent-util.h" #include "fd-util.h" #include "fs-util.h" #include "glyph-util.h" #include "hashmap.h" #include "log...
20,287
29.011834
132
c
null
systemd-main/src/detect-virt/detect-virt.c
/* SPDX-License-Identifier: LGPL-2.1-or-later */ #include <errno.h> #include <getopt.h> #include <stdbool.h> #include <stdlib.h> #include "alloc-util.h" #include "build.h" #include "confidential-virt.h" #include "main-func.h" #include "pretty-print.h" #include "string-table.h" #include "virt.h" static bool arg_quiet...
6,736
32.187192
133
c
null
systemd-main/src/environment-d-generator/environment-d-generator.c
/* SPDX-License-Identifier: LGPL-2.1-or-later */ #include "sd-path.h" #include "conf-files.h" #include "constants.h" #include "env-file.h" #include "escape.h" #include "glyph-util.h" #include "log.h" #include "main-func.h" #include "path-lookup.h" #include "strv.h" static int environment_dirs(char ***ret) { ...
2,613
25.14
105
c
null
systemd-main/src/fundamental/bootspec-fundamental.c
/* SPDX-License-Identifier: LGPL-2.1-or-later */ #include "bootspec-fundamental.h" bool bootspec_pick_name_version_sort_key( const sd_char *os_pretty_name, const sd_char *os_image_id, const sd_char *os_name, const sd_char *os_id, const sd...
2,728
42.31746
109
c
null
systemd-main/src/fundamental/bootspec-fundamental.h
/* SPDX-License-Identifier: LGPL-2.1-or-later */ #pragma once #include "string-util-fundamental.h" bool bootspec_pick_name_version_sort_key( const sd_char *os_pretty_name, const sd_char *os_image_id, const sd_char *os_name, const sd_char *os_id, ...
628
33.944444
48
h
null
systemd-main/src/fundamental/confidential-virt-fundamental.h
/* SPDX-License-Identifier: LGPL-2.1-or-later */ #include <stdint.h> /* Keep CVM detection logic in this file at feature parity with * that in src/efi/boot/vmm.c */ #define CPUID_PROCESSOR_INFO_AND_FEATURE_BITS UINT32_C(0x1) /* * AMD64 Architecture Programmer’s Manual Volume 3: * General-Purpose and System Instr...
2,476
32.931507
124
h
null
systemd-main/src/fundamental/efivars-fundamental.c
/* SPDX-License-Identifier: LGPL-2.1-or-later */ #include "efivars-fundamental.h" static const sd_char * const table[_SECURE_BOOT_MAX] = { [SECURE_BOOT_UNSUPPORTED] = STR_C("unsupported"), [SECURE_BOOT_DISABLED] = STR_C("disabled"), [SECURE_BOOT_UNKNOWN] = STR_C("unknown"), [SEC...
1,510
38.763158
92
c
null
systemd-main/src/fundamental/efivars-fundamental.h
/* SPDX-License-Identifier: LGPL-2.1-or-later */ #pragma once #ifdef SD_BOOT # define EINVAL 22 #else # include <errno.h> #endif #include "string-util-fundamental.h" /* Features of the loader, i.e. systemd-boot */ #define EFI_LOADER_FEATURE_CONFIG_TIMEOUT (UINT64_C(1) << 0) #define EFI_LOADER_FEATURE_CONFI...
2,139
42.673469
91
h
null
systemd-main/src/fundamental/logarithm.h
/* SPDX-License-Identifier: LGPL-2.1-or-later */ #pragma once #include <stdint.h> /* Note: log2(0) == log2(1) == 0 here and below. */ #define CONST_LOG2ULL(x) ((x) > 1 ? (unsigned) __builtin_clzll(x) ^ 63U : 0) #define NONCONST_LOG2ULL(x) ({ \ unsigned long long _x...
1,966
31.783333
104
h