Searched defs:path (Results 1 - 25 of 170) sorted by relevance

1234567

/systemd/src/basic/
H A Dstat-util.h31 int is_symlink(const char *path);
32 int is_dir(const char *path, bool follow);
33 int is_device_node(const char *path);
35 int dir_is_empty(const char *path);
37 static inline int dir_is_populated(const char *path) { argument
39 r = dir_is_empty(path);
49 int path_is_read_only_fs(const char *path);
50 int path_is_os_tree(const char *path);
60 int path_check_fstype(const char *path, statfs_f_type_t magic_value);
H A Dmkdir-label.c28 int mkdir_safe_label(const char *path, mode_t mode, uid_t uid, gid_t gid) { argument
29 return mkdir_safe_internal(path, mode, uid, gid, mkdir_label);
32 int mkdir_parents_label(const char *path, mode_t mode) { argument
33 return mkdir_parents_internal(NULL, path, mode, mkdir_label);
36 int mkdir_p_label(const char *path, mode_t mode) { argument
37 return mkdir_p_internal(NULL, path, mode, mkdir_label);
H A Dlockfile-util.h28 char *path; member in struct:LockFile
39 #define LOCK_FILE_INIT { .fd = -1, .path = NULL }
H A Dglob-util.c27 int glob_exists(const char *path) { argument
31 assert(path);
34 k = glob(path, GLOB_NOSORT|GLOB_BRACE, NULL, &g);
46 int glob_extend(char ***strv, const char *path) { argument
52 k = glob(path, GLOB_NOSORT|GLOB_BRACE, NULL, &g);
H A Drm-rf.c34 #include "path-util.h"
177 int rm_rf(const char *path, RemoveFlags flags) { argument
181 assert(path);
186 if (path_equal(path, "/")) {
193 r = btrfs_subvol_remove(path, BTRFS_REMOVE_RECURSIVE|BTRFS_REMOVE_QUOTA);
203 fd = open(path, O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC|O_NOFOLLOW|O_NOATIME);
210 if (statfs(path, &s) < 0)
220 if (unlink(path) < 0 && errno != ENOENT)
229 if (rmdir(path) < 0) {
H A Dfileio-label.c56 const char *path, FILE **f, char **temp_path) {
63 r = fopen_temporary(path, f, temp_path);
55 fopen_temporary_label(const char *target, const char *path, FILE **f, char **temp_path) argument
H A Dlabel.c29 int label_fix(const char *path, bool ignore_enoent, bool ignore_erofs) { argument
32 r = mac_selinux_fix(path, ignore_enoent, ignore_erofs);
33 q = mac_smack_fix(path, ignore_enoent, ignore_erofs);
43 int mkdir_label(const char *path, mode_t mode) { argument
46 assert(path);
48 r = mac_selinux_create_file_prepare(path, S_IFDIR);
52 if (mkdir(path, mode) < 0)
60 return mac_smack_fix(path, false, false);
H A Dmkdir.c28 #include "path-util.h"
32 int mkdir_safe_internal(const char *path, mode_t mode, uid_t uid, gid_t gid, mkdir_func_t _mkdir) { argument
35 if (_mkdir(path, mode) >= 0)
36 if (chmod_and_chown(path, mode, uid, gid) < 0)
39 if (lstat(path, &st) < 0)
53 int mkdir_safe(const char *path, mode_t mode, uid_t uid, gid_t gid) { argument
54 return mkdir_safe_internal(path, mode, uid, gid, mkdir);
57 int mkdir_parents_internal(const char *prefix, const char *path, mode_t mode, mkdir_func_t _mkdir) { argument
61 assert(path);
63 if (prefix && !path_startswith(path, prefi
106 mkdir_parents(const char *path, mode_t mode) argument
110 mkdir_p_internal(const char *prefix, const char *path, mode_t mode, mkdir_func_t _mkdir) argument
126 mkdir_p(const char *path, mode_t mode) argument
[all...]
/systemd/src/test/
H A Dtest-cgroup.c24 #include "path-util.h"
29 char *path; local
38 assert_se(cg_pid_get_path(SYSTEMD_CGROUP_CONTROLLER, getpid(), &path) == 0);
39 assert_se(streq(path, "/test-b"));
40 free(path);
44 assert_se(cg_pid_get_path(SYSTEMD_CGROUP_CONTROLLER, getpid(), &path) == 0);
45 assert_se(path_equal(path, "/test-a"));
46 free(path);
50 assert_se(cg_pid_get_path(SYSTEMD_CGROUP_CONTROLLER, getpid(), &path) == 0);
51 assert_se(path_equal(path, "/tes
[all...]
H A Dtest-hostname-util.c102 char path[] = "/tmp/hostname.XXXXXX"; local
106 fd = mkostemp_safe(path, O_RDWR|O_CLOEXEC);
111 write_string_file(path, "foo", WRITE_STRING_FILE_CREATE);
112 assert_se(read_hostname_config(path, &hostname) == 0);
117 write_string_file(path, "# comment\nfoo", WRITE_STRING_FILE_CREATE);
118 assert_se(read_hostname_config(path, &hostname) == 0);
124 write_string_file(path, "# comment\n\n foo ", WRITE_STRING_FILE_CREATE);
125 assert_se(read_hostname_config(path, &hostname) == 0);
131 write_string_file(path, "!foo/bar.com", WRITE_STRING_FILE_CREATE);
132 assert_se(read_hostname_config(path,
[all...]
H A Dtest-conf-files.c41 _cleanup_free_ char *path = strappend(tmp_dir, files); local
42 assert_se(touch_file(path, true, USEC_INFINITY, UID_INVALID, GID_INVALID, MODE_INVALID) == 0);
/systemd/src/boot/efi/
H A Ddisk.c24 /* export the device path this image is started from */
27 EFI_DEVICE_PATH *path, *paths; local
30 for (path = paths; !IsDevicePathEnd(path); path = NextDevicePathNode(path)) {
33 if (DevicePathType(path) != MEDIA_DEVICE_PATH)
35 if (DevicePathSubType(path) != MEDIA_HARDDRIVE_DP)
37 drive = (HARDDRIVE_DEVICE_PATH *)path;
/systemd/src/bus-proxyd/
H A Dtest-bus-xml-policy.c34 _cleanup_free_ char *path = NULL; local
37 path = strjoin(TEST_DIR, "/bus-policy/", name, NULL);
38 assert_se(path);
40 if (access(path, R_OK) == 0)
41 r = policy_load(p, STRV_MAKE(path));
96 assert_se(policy_check_one_send(&p, 0, 0, SD_BUS_MESSAGE_SIGNAL, "bli.bla.blubb", NULL, "/an/object/path", NULL) == true);
97 assert_se(policy_check_one_send(&p, 1, 0, SD_BUS_MESSAGE_SIGNAL, "bli.bla.blubb", NULL, "/an/object/path", NULL) == false);
105 assert_se(policy_check_one_send(&p, 0, 0, SD_BUS_MESSAGE_METHOD_CALL, "org.test.test1", "/an/object/path", "bli.bla.blubb", "Member") == false);
106 assert_se(policy_check_one_send(&p, 0, 0, SD_BUS_MESSAGE_METHOD_CALL, "org.test.test1", "/an/object/path", "bli.bla.blubb", "Member") == false);
107 assert_se(policy_check_one_send(&p, 0, 0, SD_BUS_MESSAGE_METHOD_CALL, "org.test.test1", "/an/object/path", "or
[all...]
/systemd/src/login/
H A Dlogind-acl.h29 int devnode_acl(const char *path,
41 static inline int devnode_acl(const char *path, argument
/systemd/src/core/
H A Ddbus-path.c21 #include "dbus-path.h"
22 #include "path.h"
30 const char *path,
50 r = sd_bus_message_append(reply, "(ss)", path_type_to_string(k->type), k->path);
60 const char *path,
28 property_get_paths( sd_bus *bus, const char *path, const char *interface, const char *property, sd_bus_message *reply, void *userdata, sd_bus_error *error) argument
58 property_get_unit( sd_bus *bus, const char *path, const char *interface, const char *property, sd_bus_message *reply, void *userdata, sd_bus_error *error) argument
H A Ddbus-job.c35 const char *path,
33 property_get_unit( sd_bus *bus, const char *path, const char *interface, const char *property, sd_bus_message *reply, void *userdata, sd_bus_error *error) argument
H A Ddbus-swap.c31 const char *path,
57 const char *path,
29 property_get_priority( sd_bus *bus, const char *path, const char *interface, const char *property, sd_bus_message *reply, void *userdata, sd_bus_error *error) argument
55 property_get_options( sd_bus *bus, const char *path, const char *interface, const char *property, sd_bus_message *reply, void *userdata, sd_bus_error *error) argument
H A Dkmod-setup.c53 const char *path; member in struct:__anon58
85 if (kmod_table[i].path && access(kmod_table[i].path, F_OK) >= 0)
/systemd/src/import/
H A Daufs-util.c64 int aufs_resolve(const char *path) { argument
68 r = nftw(path, nftw_cb, 64, FTW_MOUNT|FTW_PHYS|FTW_ACTIONRETVAL);
H A Dimport-common.c63 int import_make_read_only(const char *path) { argument
66 fd = open(path, O_RDONLY|O_NOCTTY|O_CLOEXEC);
68 return log_error_errno(errno, "Failed to open %s: %m", path);
73 int import_fork_tar_x(const char *path, pid_t *ret) { argument
78 assert(path);
139 execlp("tar", "tar", "--numeric-owner", "-C", path, "-px", NULL);
153 int import_fork_tar_c(const char *path, pid_t *ret) { argument
158 assert(path);
213 execlp("tar", "tar", "-C", path, "-c", ".", NULL);
/systemd/src/libsystemd/sd-bus/
H A Dtest-bus-introspect.c23 static int prop_get(sd_bus *bus, const char *path, const char *interface, const char *property, sd_bus_message *reply, void *userdata, sd_bus_error *error) { argument
27 static int prop_set(sd_bus *bus, const char *path, const char *interface, const char *property, sd_bus_message *reply, void *userdata, sd_bus_error *error) { argument
/systemd/src/udev/
H A Dudev-builtin-uaccess.c34 const char *path = NULL, *seat; local
44 path = udev_device_get_devnode(dev);
59 r = devnode_acl(path, true, false, 0, true, uid);
61 log_full_errno(r == -ENOENT ? LOG_DEBUG : LOG_ERR, r, "Failed to apply ACL on %s: %m", path);
69 if (path && !changed_acl) {
73 k = devnode_acl(path, true, false, 0, false, 0);
75 log_full_errno(errno == ENOENT ? LOG_DEBUG : LOG_ERR, k, "Failed to apply ACL on %s: %m", path);
/systemd/src/update-done/
H A Dupdate-done.c30 static int apply_timestamp(const char *path, struct timespec *ts) { argument
37 assert(path);
40 if (stat(path, &st) >= 0) {
53 if (utimensat(AT_FDCWD, path, twice, AT_SYMLINK_NOFOLLOW) < 0) {
56 return log_debug("Can't update timestamp file %s, file system is read-only.", path);
58 return log_error_errno(errno, "Failed to update timestamp on %s: %m", path);
67 r = mac_selinux_create_file_prepare(path, S_IFREG);
69 return log_error_errno(r, "Failed to set SELinux context for %s: %m", path);
71 fd = open(path, O_CREAT|O_EXCL|O_WRONLY|O_TRUNC|O_CLOEXEC|O_NOCTTY|O_NOFOLLOW, 0644);
76 return log_debug("Can't create timestamp file %s, file system is read-only.", path);
[all...]
/systemd/tools/
H A Dmake-man-rules.py23 import os.path namespace
72 return 'man/{}'.format(os.path.basename(file))
/systemd/src/nspawn/
H A Dnspawn-cgroup.c33 _cleanup_free_ char *path = NULL, *fs = NULL; local
38 r = cg_pid_get_path(NULL, pid, &path);
40 return log_error_errno(r, "Failed to get container cgroup path: %m");
42 r = cg_get_path(SYSTEMD_CGROUP_CONTROLLER, path, NULL, &fs);
44 return log_error_errno(r, "Failed to get file system path for container cgroup: %m");
83 * we copy the path from the name=systemd hierarchy into the

Completed in 38 milliseconds

1234567