/systemd-251/src/libsystemd/sd-bus/ |
D | bus-dump.c | 131 _cleanup_free_ char *prefix = NULL; in sd_bus_message_dump() local 133 prefix = indent(0, flags); in sd_bus_message_dump() 134 if (!prefix) in sd_bus_message_dump() 137 fprintf(f, "%sMESSAGE \"%s\" {\n", prefix, strempty(m->root_container.signature)); in sd_bus_message_dump() 141 _cleanup_free_ char *prefix = NULL; in sd_bus_message_dump() local 171 prefix = indent(level, flags); in sd_bus_message_dump() 172 if (!prefix) in sd_bus_message_dump() 175 fprintf(f, "%s};\n", prefix); in sd_bus_message_dump() 179 prefix = indent(level, flags); in sd_bus_message_dump() 180 if (!prefix) in sd_bus_message_dump() [all …]
|
D | test-bus-signature.c | 9 char prefix[256]; in main() local 122 OBJECT_PATH_FOREACH_PREFIX(prefix, "/") { in main() 123 log_info("<%s>", prefix); in main() 128 OBJECT_PATH_FOREACH_PREFIX(prefix, "/xxx") { in main() 129 log_info("<%s>", prefix); in main() 130 assert_se(streq(prefix, "/")); in main() 137 OBJECT_PATH_FOREACH_PREFIX(prefix, "/xxx/yyy/zzz") { in main() 138 log_info("<%s>", prefix); in main() 139 assert_se(r != 0 || streq(prefix, "/xxx/yyy")); in main() 140 assert_se(r != 1 || streq(prefix, "/xxx")); in main() [all …]
|
D | bus-objects.c | 99 const char *prefix, in add_enumerated_to_set() argument 107 assert(prefix); in add_enumerated_to_set() 121 r = c->callback(bus, prefix, slot->userdata, &children, error); in add_enumerated_to_set() 142 if (!object_path_startswith(*k, prefix)) { in add_enumerated_to_set() 169 const char *prefix, in add_subtree_to_set() argument 178 assert(prefix); in add_subtree_to_set() 182 r = add_enumerated_to_set(bus, prefix, n->enumerators, s, error); in add_subtree_to_set() 191 if (!object_path_startswith(i->path, prefix)) in add_subtree_to_set() 204 r = add_subtree_to_set(bus, prefix, i, flags, s, error); in add_subtree_to_set() 217 const char *prefix, in get_child_nodes() argument [all …]
|
/systemd-251/src/core/ |
D | unit-serialize.c | 625 void unit_dump(Unit *u, FILE *f, const char *prefix) { in unit_dump() argument 636 prefix = strempty(prefix); in unit_dump() 637 prefix2 = strjoina(prefix, "\t"); in unit_dump() 641 prefix, u->id); in unit_dump() 644 fprintf(f, "%s\tAlias: %s\n", prefix, t); in unit_dump() 661 prefix, unit_description(u), in unit_dump() 662 prefix, strna(u->instance), in unit_dump() 663 prefix, unit_load_state_to_string(u->load_state), in unit_dump() 664 prefix, unit_active_state_to_string(unit_active_state(u)), in unit_dump() 665 prefix, strna(FORMAT_TIMESTAMP(u->state_change_timestamp.realtime)), in unit_dump() [all …]
|
D | kill.c | 19 void kill_context_dump(KillContext *c, FILE *f, const char *prefix) { in kill_context_dump() argument 22 prefix = strempty(prefix); in kill_context_dump() 31 prefix, kill_mode_to_string(c->kill_mode), in kill_context_dump() 32 prefix, signal_to_string(c->kill_signal), in kill_context_dump() 33 prefix, signal_to_string(restart_kill_signal(c)), in kill_context_dump() 34 prefix, signal_to_string(c->final_kill_signal), in kill_context_dump() 35 prefix, yes_no(c->send_sigkill), in kill_context_dump() 36 prefix, yes_no(c->send_sighup)); in kill_context_dump()
|
D | manager-dump.c | 10 void manager_dump_jobs(Manager *s, FILE *f, const char *prefix) { in manager_dump_jobs() argument 17 job_dump(j, f, prefix); in manager_dump_jobs() 20 void manager_dump_units(Manager *s, FILE *f, const char *prefix) { in manager_dump_units() argument 29 unit_dump(u, f, prefix); in manager_dump_units() 32 void manager_dump(Manager *m, FILE *f, const char *prefix) { in manager_dump() argument 36 …intf(f, "%sManager: systemd " STRINGIFY(PROJECT_VERSION) " (" GIT_VERSION ")\n", strempty(prefix)); in manager_dump() 37 fprintf(f, "%sFeatures: %s\n", strempty(prefix), systemd_features); in manager_dump() 44 strempty(prefix), in manager_dump() 50 manager_dump_units(m, f, prefix); in manager_dump() 51 manager_dump_jobs(m, f, prefix); in manager_dump()
|
D | execute.c | 1953 if (!p->prefix[t]) in build_environment() 1966 prefixed = path_join(p->prefix[t], c->directories[t].items[i].path); in build_environment() 1981 if (exec_context_has_credentials(c) && p->prefix[EXEC_DIRECTORY_RUNTIME]) { in build_environment() 1982 … x = strjoin("CREDENTIALS_DIRECTORY=", p->prefix[EXEC_DIRECTORY_RUNTIME], "/credentials/", u->id); in build_environment() 2087 if (params && !params->prefix[t]) in exec_needs_mount_namespace() 2331 if (!params->prefix[type]) in setup_exec_directory() 2344 p = path_join(params->prefix[type], context->directories[type].items[i].path); in setup_exec_directory() 2380 pp = path_join(params->prefix[type], "private"); in setup_exec_directory() 2449 … q = path_join(params->prefix[type], "private", context->directories[type].items[i].path); in setup_exec_directory() 2529 r = create_many_symlinks(params->prefix[type], in setup_exec_directory() [all …]
|
/systemd-251/test/units/ |
D | testsuite-22.07.sh | 8 rm -rf /tmp/test-prefix 10 mkdir /tmp/test-prefix 11 touch /tmp/test-prefix/file 14 r /tmp/test-prefix 15 r /tmp/test-prefix/file 18 test ! -f /tmp/test-prefix/file 19 test ! -f /tmp/test-prefix 21 mkdir /tmp/test-prefix 22 touch /tmp/test-prefix/file 25 r /tmp/test-prefix/file [all …]
|
/systemd-251/src/shared/ |
D | cgroup-show.c | 35 const char *prefix, in show_pid_array() argument 73 printf("%s%s ", prefix, special_glyph(SPECIAL_GLYPH_TRIANGULAR_BULLET)); in show_pid_array() 75 …printf("%s%s", prefix, special_glyph(((more || i < n_pids-1) ? SPECIAL_GLYPH_TREE_BRANCH : SPECIAL… in show_pid_array() 83 const char *prefix, in show_cgroup_one_by_path() argument 126 show_pid_array(pids, n, prefix, n_columns, false, more, flags); in show_cgroup_one_by_path() 158 const char *prefix, in show_cgroup_name() argument 196 prefix, special_glyph(glyph), in show_cgroup_name() 242 prefix, in show_cgroup_name() 255 const char *prefix, in show_cgroup_by_path() argument 270 prefix = strempty(prefix); in show_cgroup_by_path() [all …]
|
D | dropin.c | 29 char prefix[DECIMAL_STR_MAX(unsigned)]; in drop_in_file() local 37 sprintf(prefix, "%u", level); in drop_in_file() 47 q = strjoin(p, "/", prefix, "-", b, ".conf"); in drop_in_file() 134 _cleanup_free_ char *prefix = NULL, *instance = NULL, *built = NULL; in unit_file_find_dirs() local 177 r = unit_name_to_prefix(name, &prefix); in unit_file_find_dirs() 183 dash = strrchr(prefix, '-'); in unit_file_find_dirs() 187 n = (size_t) (dash - prefix); in unit_file_find_dirs() 191 if (prefix[n+1] != 0 || chopped) { in unit_file_find_dirs() 192 prefix[n+1] = 0; in unit_file_find_dirs() 197 prefix[n] = 0; in unit_file_find_dirs() [all …]
|
D | install-printf.c | 18 _cleanup_free_ char *prefix = NULL; in specifier_prefix_and_instance() local 21 r = unit_name_to_prefix_and_instance(i->name, &prefix); in specifier_prefix_and_instance() 25 if (endswith(prefix, "@") && i->default_instance) { in specifier_prefix_and_instance() 28 ans = strjoin(prefix, i->default_instance); in specifier_prefix_and_instance() 33 *ret = TAKE_PTR(prefix); in specifier_prefix_and_instance() 78 _cleanup_free_ char *prefix = NULL; in specifier_last_component() local 84 r = specifier_prefix(specifier, data, root, userdata, &prefix); in specifier_last_component() 88 dash = strrchr(prefix, '-'); in specifier_last_component() 95 *ret = TAKE_PTR(prefix); in specifier_last_component()
|
D | bus-unit-procs.c | 137 const char *prefix, in dump_processes() argument 144 assert(prefix); in dump_processes() 192 prefix, in dump_processes() 228 fputs(prefix, stdout); in dump_processes() 235 pp = strjoin(prefix, special); in dump_processes() 251 const char *prefix, in dump_extra_processes() argument 314 prefix, in dump_extra_processes() 327 const char *prefix, in unit_show_processes() argument 345 prefix = strempty(prefix); in unit_show_processes() 390 r = dump_processes(cgroups, cgroup_path, prefix, n_columns, flags); in unit_show_processes() [all …]
|
/systemd-251/src/udev/ |
D | udevadm-info.c | 181 static int print_record(sd_device *device, const char *prefix) { in print_record() argument 189 prefix = strempty(prefix); in print_record() 209 printf("%sP: %s%s%s\n", prefix, ansi_highlight_white(), str, ansi_normal()); in print_record() 212 printf("%sM: %s%s%s\n", prefix, ansi_highlight_white(), str, ansi_normal()); in print_record() 215 printf("%sR: %s%s%s\n", prefix, ansi_highlight_white(), str, ansi_normal()); in print_record() 218 printf("%sU: %s%s%s\n", prefix, ansi_highlight_green(), subsys, ansi_normal()); in print_record() 221 printf("%sT: %s%s%s\n", prefix, ansi_highlight_green(), str, ansi_normal()); in print_record() 225 prefix, in print_record() 231 printf("%sI: %s%i%s\n", prefix, ansi_highlight_cyan(), ifi, ansi_normal()); in print_record() 235 printf("%sN: %s%s%s\n", prefix, ansi_highlight_cyan(), val, ansi_normal()); in print_record() [all …]
|
D | udev-builtin-hwdb.c | 21 const char *prefix, const char *modalias, in udev_builtin_hwdb_lookup() argument 30 if (prefix) { in udev_builtin_hwdb_lookup() 31 lookup = strjoin(prefix, modalias); in udev_builtin_hwdb_lookup() 68 const char *subsystem, const char *prefix, in udev_builtin_hwdb_search() argument 107 r = udev_builtin_hwdb_lookup(dev, prefix, modalias, filter, test); in udev_builtin_hwdb_search() 132 const char *prefix = NULL; in builtin_hwdb() local 160 prefix = optarg; in builtin_hwdb() 167 r = udev_builtin_hwdb_lookup(dev, prefix, argv[optind], filter, test); in builtin_hwdb() 182 r = udev_builtin_hwdb_search(dev, srcdev, subsystem, prefix, filter, test); in builtin_hwdb()
|
/systemd-251/src/network/ |
D | networkd-radv.c | 66 Prefix *prefix_free(Prefix *prefix) { in prefix_free() argument 67 if (!prefix) in prefix_free() 70 if (prefix->network) { in prefix_free() 71 assert(prefix->section); in prefix_free() 72 hashmap_remove(prefix->network->prefixes_by_section, prefix->section); in prefix_free() 75 config_section_free(prefix->section); in prefix_free() 76 set_free(prefix->tokens); in prefix_free() 78 return mfree(prefix); in prefix_free() 85 _cleanup_(prefix_freep) Prefix *prefix = NULL; in prefix_new_static() 97 prefix = hashmap_get(network->prefixes_by_section, n); in prefix_new_static() [all …]
|
D | networkd-dhcp-prefix-delegation.c | 74 static void link_remove_dhcp_pd_subnet_prefix(Link *link, const struct in6_addr *prefix) { in link_remove_dhcp_pd_subnet_prefix() argument 79 assert(prefix); in link_remove_dhcp_pd_subnet_prefix() 81 if (hashmap_get(link->manager->links_by_dhcp_pd_subnet_prefix, prefix) != link) in link_remove_dhcp_pd_subnet_prefix() 84 hashmap_remove2(link->manager->links_by_dhcp_pd_subnet_prefix, prefix, &key); in link_remove_dhcp_pd_subnet_prefix() 88 static int link_add_dhcp_pd_subnet_prefix(Link *link, const struct in6_addr *prefix) { in link_add_dhcp_pd_subnet_prefix() argument 93 assert(prefix); in link_add_dhcp_pd_subnet_prefix() 95 copy = newdup(struct in6_addr, prefix, 1); in link_add_dhcp_pd_subnet_prefix() 108 static int link_get_by_dhcp_pd_subnet_prefix(Manager *manager, const struct in6_addr *prefix, Link … in link_get_by_dhcp_pd_subnet_prefix() argument 112 assert(prefix); in link_get_by_dhcp_pd_subnet_prefix() 114 link = hashmap_get(manager->links_by_dhcp_pd_subnet_prefix, prefix); in link_get_by_dhcp_pd_subnet_prefix() [all …]
|
D | networkd-address-generation.c | 43 static int generate_eui64_address(const Link *link, const struct in6_addr *prefix, struct in6_addr … in generate_eui64_address() argument 45 assert(prefix); in generate_eui64_address() 48 memcpy(ret->s6_addr, prefix, 8); in generate_eui64_address() 96 const struct in6_addr *prefix, in generate_stable_private_address_one() argument 105 assert(prefix); in generate_stable_private_address_one() 113 siphash24_compress(prefix, 8, &state); in generate_stable_private_address_one() 124 memcpy(ret->s6_addr, prefix->s6_addr, 8); in generate_stable_private_address_one() 132 const struct in6_addr *prefix, in generate_stable_private_address() argument 143 assert(prefix); in generate_stable_private_address() 159 generate_stable_private_address_one(link, secret_key, prefix, i, &addr); in generate_stable_private_address() [all …]
|
/systemd-251/src/basic/ |
D | path-util.h | 56 char* path_make_absolute(const char *p, const char *prefix); 60 char *path_startswith_full(const char *path, const char *prefix, bool accept_dot_dot) _pure_; 61 static inline char* path_startswith(const char *path, const char *prefix) { in path_startswith() argument 62 return path_startswith_full(path, prefix, true); in path_startswith() 106 #define PATH_FOREACH_PREFIX(prefix, path) \ argument 108 path_simplify(strcpy(prefix, path)); \ 109 streq(prefix, "/") ? NULL : strrchr(prefix, '/'); \ 112 _slash = strrchr((prefix), '/')) 115 #define PATH_FOREACH_PREFIX_MORE(prefix, path) \ argument 117 path_simplify(strcpy(prefix, path)); \ [all …]
|
D | mkdir.c | 90 int mkdir_parents_internal(const char *prefix, const char *path, mode_t mode, uid_t uid, gid_t gid,… in mkdir_parents_internal() argument 97 if (prefix) { in mkdir_parents_internal() 98 p = path_startswith_full(path, prefix, /* accept_dot_dot= */ false); in mkdir_parents_internal() 143 if (!prefix || !path_startswith_full(prefix, path, /* accept_dot_dot= */ false)) { in mkdir_parents_internal() 157 int mkdir_parents_safe(const char *prefix, const char *path, mode_t mode, uid_t uid, gid_t gid, Mkd… in mkdir_parents_safe() argument 158 return mkdir_parents_internal(prefix, path, mode, uid, gid, flags, mkdirat_errno_wrapper); in mkdir_parents_safe() 161 int mkdir_p_internal(const char *prefix, const char *path, mode_t mode, uid_t uid, gid_t gid, Mkdir… in mkdir_p_internal() argument 168 … r = mkdir_parents_internal(prefix, path, mode, uid, gid, flags | MKDIR_FOLLOW_SYMLINK, _mkdirat); in mkdir_p_internal() 189 int mkdir_p_safe(const char *prefix, const char *path, mode_t mode, uid_t uid, gid_t gid, MkdirFlag… in mkdir_p_safe() argument 190 return mkdir_p_internal(prefix, path, mode, uid, gid, flags, mkdirat_errno_wrapper); in mkdir_p_safe()
|
/systemd-251/src/libsystemd-network/ |
D | test-ndisc-ra.c | 63 } prefix[] = { variable 129 assert_se(sd_radv_prefix_set_prefix(p, &prefix[0].address, 64) >= 0); in TEST() 130 assert_se(sd_radv_prefix_set_prefix(p, &prefix[0].address, 0) < 0); in TEST() 131 assert_se(sd_radv_prefix_set_prefix(p, &prefix[0].address, 1) < 0); in TEST() 132 assert_se(sd_radv_prefix_set_prefix(p, &prefix[0].address, 2) < 0); in TEST() 133 assert_se(sd_radv_prefix_set_prefix(p, &prefix[0].address, 3) >= 0); in TEST() 134 assert_se(sd_radv_prefix_set_prefix(p, &prefix[0].address, 125) >= 0); in TEST() 135 assert_se(sd_radv_prefix_set_prefix(p, &prefix[0].address, 128) >= 0); in TEST() 136 assert_se(sd_radv_prefix_set_prefix(p, &prefix[0].address, 129) < 0); in TEST() 137 assert_se(sd_radv_prefix_set_prefix(p, &prefix[0].address, 255) < 0); in TEST() [all …]
|
/systemd-251/src/boot/ |
D | bless-boot.c | 217 _cleanup_free_ char *path = NULL, *prefix = NULL, *suffix = NULL; in acquire_boot_count_path() local 248 prefix = strndup(path, e - path); in acquire_boot_count_path() 249 if (!prefix) in acquire_boot_count_path() 268 *ret_prefix = TAKE_PTR(prefix); in acquire_boot_count_path() 277 static int make_good(const char *prefix, const char *suffix, char **ret) { in make_good() argument 280 assert(prefix); in make_good() 288 good = strjoin(prefix, suffix); in make_good() 296 static int make_bad(const char *prefix, uint64_t done, const char *suffix, char **ret) { in make_bad() argument 299 assert(prefix); in make_bad() 307 bad = strjoin(prefix, "+0", suffix); in make_bad() [all …]
|
/systemd-251/src/oom/ |
D | oomd-util.c | 145 int oomd_sort_cgroup_contexts(Hashmap *h, oomd_compare_t compare_func, const char *prefix, OomdCGro… in oomd_sort_cgroup_contexts() argument 160 …if ((item->path && prefix && !path_startswith(item->path, prefix)) || item->preference == MANAGED_… in oomd_sort_cgroup_contexts() 223 typedef void (*dump_candidate_func)(const OomdCGroupContext *ctx, FILE *f, const char *prefix); 247 int oomd_kill_by_pgscan_rate(Hashmap *h, const char *prefix, bool dry_run, char **ret_selected) { in oomd_kill_by_pgscan_rate() argument 255 n = oomd_sort_cgroup_contexts(h, compare_pgscan_rate_and_memory_usage, prefix, &sorted); in oomd_kill_by_pgscan_rate() 551 void oomd_dump_swap_cgroup_context(const OomdCGroupContext *ctx, FILE *f, const char *prefix) { in oomd_dump_swap_cgroup_context() argument 559 strempty(prefix), ctx->path, in oomd_dump_swap_cgroup_context() 560 strempty(prefix), FORMAT_BYTES(ctx->swap_usage)); in oomd_dump_swap_cgroup_context() 565 strempty(prefix), ctx->path, in oomd_dump_swap_cgroup_context() 566 strempty(prefix)); in oomd_dump_swap_cgroup_context() [all …]
|
/systemd-251/src/login/ |
D | sysfs-show.c | 22 const char *prefix, in show_sysfs_one() argument 32 assert(prefix); in show_sysfs_one() 92 …printf("%s%s%s\n", prefix, special_glyph(lookahead < n_dev ? SPECIAL_GLYPH_TREE_BRANCH : SPECIAL_G… in show_sysfs_one() 106 …printf("%s%s%s\n", prefix, lookahead < n_dev ? special_glyph(SPECIAL_GLYPH_TREE_VERTICAL) : " ", … in show_sysfs_one() 111 … p = strjoin(prefix, lookahead < n_dev ? special_glyph(SPECIAL_GLYPH_TREE_VERTICAL) : " "); in show_sysfs_one() 127 int show_sysfs(const char *seat, const char *prefix, unsigned n_columns, OutputFlags flags) { in show_sysfs() argument 136 prefix = strempty(prefix); in show_sysfs() 160 show_sysfs_one(seat, dev_list, &i, n_dev, "/", prefix, n_columns, flags); in show_sysfs() 162 printf("%s%s%s\n", prefix, special_glyph(SPECIAL_GLYPH_TREE_RIGHT), "(none)"); in show_sysfs()
|
/systemd-251/src/test/ |
D | test-gpt.c | 19 FOREACH_STRING(prefix, "root-", "usr-") in TEST() 25 joined = strjoin(prefix, architecture_to_string(a), suffix); in TEST() 37 if (streq(prefix, "root-") && streq(suffix, "")) in TEST() 39 if (streq(prefix, "root-") && streq(suffix, "-verity")) in TEST() 41 if (streq(prefix, "usr-") && streq(suffix, "")) in TEST() 43 if (streq(prefix, "usr-") && streq(suffix, "-verity")) in TEST()
|
/systemd-251/src/fundamental/ |
D | string-util-fundamental.c | 10 sd_char *startswith(const sd_char *s, const sd_char *prefix) { in startswith() argument 14 assert(prefix); in startswith() 16 l = strlen(prefix); in startswith() 17 if (!strneq(s, prefix, l)) in startswith() 24 sd_char *startswith_no_case(const sd_char *s, const sd_char *prefix) { in startswith_no_case() argument 28 assert(prefix); in startswith_no_case() 30 l = strlen(prefix); in startswith_no_case() 31 if (!strncaseeq(s, prefix, l)) in startswith_no_case()
|