Searched defs:root (Results 1 - 25 of 30) sorted by relevance

12

/systemd/src/test/
H A Dtest-cgroup-mask.c29 Unit *son, *daughter, *parent, *root, *grandchild, *parent_deep; local
70 root = UNIT_DEREF(parent->slice);
78 assert_se(unit_get_own_mask(root) == 0);
86 assert_se(unit_get_members_mask(root) == (CGROUP_MASK_CPU | CGROUP_MASK_CPUACCT | CGROUP_MASK_BLKIO | CGROUP_MASK_MEMORY));
94 assert_se(unit_get_siblings_mask(root) == (CGROUP_MASK_CPU | CGROUP_MASK_CPUACCT | CGROUP_MASK_BLKIO | CGROUP_MASK_MEMORY));
102 assert_se(unit_get_target_mask(root) == ((CGROUP_MASK_CPU | CGROUP_MASK_CPUACCT | CGROUP_MASK_BLKIO | CGROUP_MASK_MEMORY) & m->cgroup_supported));
H A Dtest-process-util.c37 _cleanup_free_ char *a = NULL, *c = NULL, *d = NULL, *f = NULL, *i = NULL, *cwd = NULL, *root = NULL; local
82 r = get_process_root(me, &root);
84 log_info("pid1 root: '%s'", root);
H A Dtest-install-root.c27 static void test_basic_mask_and_enable(const char *root) { argument
33 assert_se(unit_file_get_state(UNIT_FILE_SYSTEM, root, "a.service", NULL) == -ENOENT);
34 assert_se(unit_file_get_state(UNIT_FILE_SYSTEM, root, "b.service", NULL) == -ENOENT);
35 assert_se(unit_file_get_state(UNIT_FILE_SYSTEM, root, "c.service", NULL) == -ENOENT);
36 assert_se(unit_file_get_state(UNIT_FILE_SYSTEM, root, "d.service", NULL) == -ENOENT);
38 p = strjoina(root, "/usr/lib/systemd/system/a.service");
43 assert_se(unit_file_get_state(UNIT_FILE_SYSTEM, root, "a.service", NULL) >= 0);
44 assert_se(unit_file_get_state(UNIT_FILE_SYSTEM, root, "a.service", &state) >= 0 && state == UNIT_FILE_DISABLED);
46 p = strjoina(root, "/usr/lib/systemd/system/b.service");
49 assert_se(unit_file_get_state(UNIT_FILE_SYSTEM, root, "
166 test_linked_units(const char *root) argument
307 test_default(const char *root) argument
341 test_add_dependency(const char *root) argument
368 test_template_enable(const char *root) argument
474 test_indirect(const char *root) argument
523 test_preset_and_list(const char *root) argument
632 char root[] = "/tmp/rootXXXXXX"; local
[all...]
H A Dtest-cgroup-util.c286 static void test_shift_path_one(const char *raw, const char *root, const char *shifted) { argument
289 assert_se(cg_shift_path(raw, root, &s) >= 0);
/systemd/src/basic/
H A Dstrbuf.h29 struct strbuf_node *root; member in struct:strbuf
H A Dc-rbtree.h29 * field, which is a pointer to the root node. If NULL, the tree is empty. If
83 * @root: pointer to the root node, or NULL
86 * pointer to the root node of the tree. The API user is free to access the
87 * @root member at any time, and use it to traverse the tree.
92 CRBNode *root; member in struct:CRBTree
214 i = t->root;
279 i = &t->root;
H A Dconf-files.c39 static int files_add(Hashmap *h, const char *root, const char *path, const char *suffix) { argument
48 dirpath = prefix_roota(root, path);
91 static int conf_files_list_strv_internal(char ***strv, const char *suffix, const char *root, char **dirs) { argument
100 if (!path_strv_resolve_uniq(dirs, root))
108 r = files_add(fh, root, *p, suffix);
125 int conf_files_list_strv(char ***strv, const char *suffix, const char *root, const char* const* dirs) { argument
135 return conf_files_list_strv_internal(strv, suffix, root, copy);
138 int conf_files_list(char ***strv, const char *suffix, const char *root, const char *dir, ...) { argument
152 return conf_files_list_strv_internal(strv, suffix, root, dirs);
155 int conf_files_list_nulstr(char ***strv, const char *suffix, const char *root, cons argument
[all...]
H A Duser-util.c113 * NSS lookups for root we hardcode its data. */
115 if (streq(*username, "root") || streq(*username, "0")) {
116 *username = "root";
125 *home = "/root";
182 * NSS lookups for root we hardcode its data. */
184 if (streq(*groupname, "root") || streq(*groupname, "0")) {
185 *groupname = "root";
223 return strdup("root");
261 return strdup("root");
353 /* Hardcode home directory for root t
442 take_etc_passwd_lock(const char *root) argument
[all...]
H A Dfs-util.c248 int readlink_and_make_absolute_root(const char *root, const char *path, char **ret) { argument
253 full = prefix_roota(root, path);
H A Dpath-util.c343 /* Special rule, if we are talking of the root directory, a
440 char* path_join(const char *root, const char *path, const char *rest) { argument
443 if (!isempty(root))
444 return strjoin(root, endswith(root, "/") ? "" : "/",
602 char *prefix_root(const char *root, const char *path) { argument
606 /* If root is passed, prefixes path with it. Otherwise returns
615 if (isempty(root) || path_equal(root, "/"))
618 l = strlen(root)
[all...]
H A Dprocess-util.c366 int get_process_root(pid_t pid, char **root) { argument
371 p = procfs_file_alloca(pid, "root");
373 return get_process_link_contents(p, root);
642 const char *root; local
647 root = procfs_file_alloca(pid, "root");
649 return files_same(root, "/proc/1/root");
H A Dutil.c461 * 2. the root file system must be a memory file system
692 const char *root; local
694 root = procfs_file_alloca(pid, "root");
695 rfd = open(root, O_RDONLY|O_NOCTTY|O_CLOEXEC|O_DIRECTORY);
723 * escalate from non-root to root in your own namespace, so
H A Dfileio.c943 static int search_and_fopen_internal(const char *path, const char *mode, const char *root, char **search, FILE **_f) { argument
950 if (!path_strv_resolve_uniq(search, root))
957 if (root)
958 p = strjoin(root, *i, "/", path, NULL);
977 int search_and_fopen(const char *path, const char *mode, const char *root, const char **search, FILE **_f) { argument
1000 return search_and_fopen_internal(path, mode, root, copy, _f);
1003 int search_and_fopen_nulstr(const char *path, const char *mode, const char *root, const char *search, FILE **_f) { argument
1022 return search_and_fopen_internal(path, mode, root, s, _f);
/systemd/src/shared/
H A Dbase-filesystem.c49 { "root", 0755, NULL, NULL, true },
60 int base_filesystem_create(const char *root, uid_t uid, gid_t gid) { argument
65 fd = open(root, O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC|O_NOFOLLOW);
67 return log_error_errno(errno, "Failed to open root file system: %m");
102 return log_error_errno(errno, "Failed to create symlink at %s/%s: %m", root, table[i].dir);
106 return log_error_errno(errno, "Failed to chown symlink at %s/%s: %m", root, table[i].dir);
116 "Failed to create directory at %s/%s: %m", root, table[i].dir);
124 return log_error_errno(errno, "Failed to chown directory at %s/%s: %m", root, table[i].dir);
/systemd/src/libsystemd/sd-bus/
H A Dtest-bus-match.c55 static int match_add(sd_bus_slot *slots, struct bus_match_node *root, const char *match, int value) { argument
71 r = bus_match_add(root, components, n_components, &s->match_callback);
87 struct bus_match_node root = { local
101 assert_se(match_add(slots, &root, "arg2='wal\\'do',sender='foo',type='signal',interface='bar.x',", 1) >= 0);
102 assert_se(match_add(slots, &root, "arg2='wal\\'do2',sender='foo',type='signal',interface='bar.x',", 2) >= 0);
103 assert_se(match_add(slots, &root, "arg3='test',sender='foo',type='signal',interface='bar.x',", 3) >= 0);
104 assert_se(match_add(slots, &root, "arg3='test',sender='foo',type='method_call',interface='bar.x',", 4) >= 0);
105 assert_se(match_add(slots, &root, "", 5) >= 0);
106 assert_se(match_add(slots, &root, "interface='quux.x'", 6) >= 0);
107 assert_se(match_add(slots, &root, "interfac
[all...]
H A Dbus-match.c288 * we won't call any. The children of the root node
979 struct bus_match_node *root,
988 assert(root);
991 n = root;
1004 struct bus_match_node *root,
1009 assert(root);
1037 struct bus_match_node *root,
1048 assert(root);
1053 n = root;
1099 return "root";
978 bus_match_add( struct bus_match_node *root, struct bus_match_component *components, unsigned n_components, struct match_callback *callback) argument
1003 bus_match_remove( struct bus_match_node *root, struct match_callback *callback) argument
1036 bus_match_find( struct bus_match_node *root, struct bus_match_component *components, unsigned n_components, sd_bus_message_handler_t callback, void *userdata, struct match_callback **ret) argument
[all...]
/systemd/src/cgls/
H A Dcgls.c133 return log_error_errno(r, "Failed to get root control group path: No cgroup filesystem mounted on /sys/fs/cgroup");
135 return log_error_errno(r, "Failed to get root control group path: %m");
197 _cleanup_free_ char *root = NULL; local
200 r = get_cgroup_root(&root);
225 j = strjoin(root, "/", p, NULL);
234 path = root;
267 _cleanup_free_ char *root = NULL; local
269 r = get_cgroup_root(&root);
273 show_cg_info(SYSTEMD_CGROUP_CONTROLLER, root);
276 r = show_cgroup(SYSTEMD_CGROUP_CONTROLLER, root, NUL
[all...]
/systemd/src/core/
H A Dmachine-id-setup.c114 static int generate_machine_id(char id[34], const char *root) { argument
123 if (isempty(root))
126 dbus_machine_id = strjoina(root, "/var/lib/dbus/machine-id");
140 if (isempty(root)) {
199 int machine_id_setup(const char *root, sd_id128_t machine_id) { argument
206 if (isempty(root)) {
212 x = strjoina(root, "/etc/machine-id");
215 x = strjoina(root, "/run/machine-id");
222 * will be owned by root it doesn't matter much, but maybe
261 r = generate_machine_id(id, root);
298 machine_id_commit(const char *root) argument
[all...]
H A Dnamespace.c276 char *busnode = NULL, *root; local
287 root = strjoina(temporary_mount, "/kdbus");
288 (void) mkdir(root, 0755);
289 if (mount("tmpfs", root, "tmpfs", MS_NOSUID|MS_STRICTATIME, "mode=777") < 0) {
301 busnode = strjoina(root, "/bus");
321 if (mount(root, basepath, NULL, MS_MOVE, NULL) < 0) {
336 umount(root);
337 rmdir(root);
495 root_dir = prefix_roota(root_directory, "/root");
/systemd/src/udev/
H A Dudevadm-info.c272 " -r --root Prepend dev directory to path names\n"
285 bool root = 0; local
299 { "root", no_argument, NULL, 'r' },
367 root = true;
421 if (root)
430 if (root)
H A Dudevadm-hwdb.c49 struct trie_node *root; member in struct:trie
363 trie_store_nodes_size(&t, trie->root);
377 root_off = trie_store_nodes(&t, trie->root);
444 trie_insert(trie, trie->root, udev_list_entry_get_name(entry), line, value);
548 " -r,--root=PATH alternative root path in the filesystem\n"
561 { "root", required_argument, NULL, 'r' },
566 const char *root = ""; local
585 root = optarg;
619 trie->root
[all...]
/systemd/src/hwdb/
H A Dhwdb.c55 struct trie_node *root; member in struct:trie
139 if (trie->root)
140 trie_node_cleanup(trie->root);
382 trie_store_nodes_size(&t, trie->root);
396 root_off = trie_store_nodes(&t, trie->root);
461 trie_insert(trie, trie->root, *entry, line, value);
610 trie->root = new0(struct trie_node, 1);
611 if (!trie->root)
660 " -r --root=PATH Alternative root pat
[all...]
/systemd/src/journal/
H A Dcatalog.c459 int catalog_update(const char* database, const char* root, const char* const* dirs) { argument
481 r = conf_files_list_strv(&files, ".catalog", root, dirs);
/systemd/src/boot/efi/
H A Dboot.c1478 EFI_FILE *root; local
1481 root = LibOpenRoot(handles[i]);
1482 if (!root)
1484 found = config_entry_add_loader_auto(config, handles[i], root, NULL, L"auto-osx", 'a', L"OS X",
1486 uefi_call_wrapper(root->Close, 1, root);
1730 Print(L"Unable to open root directory: %r ", err);
/systemd/src/cgtop/
H A Dcgtop.c428 static int refresh(const char *root, Hashmap *a, Hashmap *b, unsigned iteration) { argument
433 r = refresh_one(SYSTEMD_CGROUP_CONTROLLER, root, a, b, iteration, 0, NULL);
436 r = refresh_one("cpuacct", root, a, b, iteration, 0, NULL);
439 r = refresh_one("memory", root, a, b, iteration, 0, NULL);
442 r = refresh_one("blkio", root, a, b, iteration, 0, NULL);
445 r = refresh_one("pids", root, a, b, iteration, 0, NULL);
852 return log_error_errno(r, "Failed to get root control group path: %m");
890 _cleanup_free_ char *root = NULL; local
908 r = get_cgroup_root(&root);
910 log_error_errno(r, "Failed to get root contro
[all...]

Completed in 4064 milliseconds

12