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

12

/lxc/src/lxc/
H A Dcaps.h40 extern bool lxc_file_cap_is_set(const char *path, cap_value_t cap, cap_flag_t flag);
62 static inline bool lxc_file_cap_is_set(const char *path, cap_value_t cap, cap_flag_t flag) { argument
H A Daf_unix.c37 int lxc_abstract_unix_open(const char *path, int type, int flags) argument
44 unlink(path);
53 if (!path)
58 len = strlen(&path[1]);
66 strncpy(&addr.sun_path[1], &path[1], strlen(&path[1]));
99 int lxc_abstract_unix_connect(const char *path) argument
113 len = strlen(&path[1]);
121 strncpy(&addr.sun_path[1], &path[1], strlen(&path[
[all...]
H A Dcaps.c226 bool lxc_file_cap_is_set(const char *path, cap_value_t cap, cap_flag_t flag) argument
232 caps = cap_get_file(path);
H A Dinitutils.c256 FILE *fopen_cloexec(const char *path, const char *mode) argument
288 fd = open(path, open_mode, 0666);
H A Dmonitor.c168 char *path; local
179 path = alloca(len);
180 ret = snprintf(path, len, "lxc/%s/monitor-sock", lxcpath);
192 hash = fnv_64a_buf(path, ret, FNV1A_64_INIT);
H A Dconsole.c219 if (!conf->rootfs.path) {
421 const char *path = console->path; local
428 if (!path && !access("/dev/tty", F_OK)) {
432 path = "/dev/tty";
436 if (!path) {
442 console->peer = lxc_unpriv(open(path, O_CLOEXEC | O_RDWR | O_CREAT | O_APPEND, 0600));
444 ERROR("failed to open \"%s\"", path);
447 DEBUG("using \"%s\" as peer tty device", path);
450 ERROR("file descriptor for file \"%s\" does not refer to a tty device", path);
[all...]
H A Dlxcutmp.c247 char path[MAXPATHLEN]; local
250 if (snprintf(path, MAXPATHLEN, "/proc/%d/root/run/utmp",
252 ERROR("path is too long");
256 if (!access(path, F_OK) && !utmpxname(path))
259 if (snprintf(path, MAXPATHLEN, "/proc/%d/root/var/run/utmp",
261 ERROR("path is too long");
265 if (utmpxname(path)) {
309 char path[MAXPATHLEN]; local
318 if (snprintf(path, MAXPATHLE
[all...]
H A Dcommands.c77 static int fill_sock_name(char *path, int len, const char *lxcname, argument
91 ret = snprintf(path, len, "lxc/%s/command", hashed_sock_name);
93 ERROR("Error writing to command sock path");
107 ret = snprintf(path, len, "%s/%s/command", lxcpath, name);
109 ERROR("Error writing to command sock path");
124 ret = snprintf(path, len, "lxc/%016" PRIx64 "/command", hash);
283 char path[sizeof(((struct sockaddr_un *)0)->sun_path)] = { 0 }; local
284 char *offset = &path[1];
295 len = sizeof(path)-2;
299 sock = lxc_abstract_unix_connect(path);
486 const char *path; local
984 char path[sizeof(((struct sockaddr_un *)0)->sun_path)] = { 0 }; local
[all...]
/lxc/src/tests/
H A Dsnapshot.c94 char path[1024]; local
95 snprintf(path, 1024, "%s/%s/snaps/snap0/rootfs", lxc_get_global_config_item("lxc.lxcpath"), MYNAME);
96 ret = stat(path, &sb);
H A Dlist.c26 int (*func)(const char *path, char ***names,
25 test_list_func(const char *lxcpath, const char *type, int (*func)(const char *path, char ***names, struct lxc_container ***cret)) argument
H A Dlxc-test-utils.c80 char path[__MNTNS_LEN]; local
122 ret = snprintf(path, __MNTNS_LEN, "/proc/self/ns/mnt");
124 lxc_error("%s\n", "Failed to create path with snprintf().");
128 init_ns = open(path, O_RDONLY | O_CLOEXEC);
/lxc/src/lxc/tools/
H A Dlxc_create.c107 char *argv[3], *path; local
119 path = get_template_path(args->template);
121 argv[0] = path;
125 execv(path, argv);
126 ERROR("Error executing %s -h", path);
H A Dlxc_destroy.c150 char path[MAXPATHLEN]; local
153 int ret = snprintf(path, MAXPATHLEN, "%s/%s/lxc_snapshots", c->config_path, c->name);
157 if (file_exists(path)) {
163 ret = snprintf(path, MAXPATHLEN, "%s/%s/snaps", c->config_path, c->name);
167 if (dir_exists(path)) {
201 char path[MAXPATHLEN]; local
211 ret = snprintf(path, MAXPATHLEN, "%s/%s/lxc_snapshots", c->config_path, c->name);
215 fd = open(path, O_RDONLY | O_CLOEXEC);
233 ERROR("could not read %s", path);
263 ret = snprintf(path, MAXPATHLE
[all...]
H A Dlxc_snapshot.c79 static void print_file(char *path);
281 static void print_file(char *path) argument
283 if (!path)
286 FILE *f = fopen(path, "r");
H A Dlxc_start.c61 static int ensure_path(char **confpath, const char *path) argument
66 if (path) {
67 if (access(path, W_OK)) {
68 fd = creat(path, 0600);
70 SYSERROR("failed to create '%s'", path);
77 fullpath = realpath(path, NULL);
79 SYSERROR("failed to get the real path of '%s'", path);
132 char path[MAXPATHLEN]; local
133 snprintf(path, MAXPATHLE
[all...]
H A Dlxc_info.c154 char path[PATH_MAX]; local
178 snprintf(path, sizeof(path), "/sys/class/net/%s/statistics/rx_bytes", ifname);
179 rc = lxc_read_from_file(path, buf, sizeof(buf));
187 snprintf(path, sizeof(path), "/sys/class/net/%s/statistics/tx_bytes", ifname);
188 rc = lxc_read_from_file(path, buf, sizeof(buf));
/lxc/src/lxc/bdev/
H A Dlxcdir.c97 int dir_detect(const char *path) argument
99 if (strncmp(path, "dir:", 4) == 0)
101 if (is_dir(path))
H A Dlxcloop.c40 static int do_loop_create(const char *path, uint64_t size, const char *fstype);
158 int loop_detect(const char *path) argument
160 if (strncmp(path, "loop:", 5) == 0)
206 static int do_loop_create(const char *path, uint64_t size, const char *fstype) argument
210 fd = creat(path, S_IRUSR|S_IWUSR);
230 if (do_mkfs(path, fstype) < 0) {
232 path);
H A Dlxcrbd.c151 int rbd_detect(const char *path) argument
153 if ( memcmp(path, "/dev/rbd/", 9) == 0)
H A Dlxcaufs.c229 int aufs_detect(const char *path) argument
231 if (strncmp(path, "aufs:", 5) == 0)
370 if (rootfs && rootfs->path)
371 rootfs_path = rootfs->path;
395 rootfsdir = aufs_get_rootfs(rootfs->path, &rootfslen);
H A Dlxclvm.c56 * path must be '/dev/$vg/$lv', $vg must be an existing VG, and $lv must not
64 static int do_lvm_create(const char *path, uint64_t size, argument
82 pathdup = strdup(path);
107 INFO("got %d for thin pool at path: %s", ret, tp);
130 int lvm_detect(const char *path) argument
137 if (strncmp(path, "lvm:", 4) == 0)
140 ret = stat(path, &statbuf);
182 int lvm_compare_lv_attr(const char *path, int pos, const char expected) argument
189 len = strlen(lvscmd) + strlen(path) - 1;
192 ret = snprintf(cmd, len, lvscmd, path);
221 lvm_is_thin_volume(const char *path) argument
226 lvm_is_thin_pool(const char *path) argument
231 lvm_snapshot(const char *orig, const char *path, uint64_t size) argument
[all...]
H A Dlxcnbd.c43 const char *path; member in struct:nbd_attach_data
46 static bool clone_attach_nbd(const char *nbd, const char *path);
49 static void nbd_detach(const char *path);
51 static bool wait_for_partition(const char *path);
55 char *orig = alloca(strlen(src)+1), *p, path[50]; local
59 /* if path is followed by a partition, drop that for now */
64 sprintf(path, "/dev/nbd%d", i);
65 if (!file_exists(path))
71 if (!clone_attach_nbd(path, orig))
81 char path[5 local
108 nbd_detect(const char *path) argument
118 char path[50]; local
163 requires_nbd(const char *path) argument
173 const char *nbd, *path; local
236 clone_attach_nbd(const char *nbd, const char *path) argument
252 char path[100]; local
261 nbd_detach(const char *path) argument
300 wait_for_partition(const char *path) argument
[all...]
H A Dlxczfs.c49 int zfs_list_entry(const char *path, char *output, size_t inlen) argument
61 if (strstr(output, path)) {
71 int zfs_detect(const char *path) argument
80 int found = zfs_list_entry(path, output, LXC_LOG_BUFFER_SIZE);
H A Dlxcbtrfs.c51 * Return the full path of objid under dirid. Let's say dirid is
71 ERROR("%s: ERROR: Failed to lookup path for %llu %llu %s - %s\n",
77 INFO("%s: got path for %llu %llu - %s\n", __func__,
127 bool is_btrfs_fs(const char *path) argument
133 fd = open(path, O_RDONLY);
147 * Taken from btrfs toolsuite. Test if path is a subvolume.
148 * return 0; path exists but it is not a subvolume
149 * return 1; path exists and it is a subvolume
152 int is_btrfs_subvol(const char *path) argument
158 ret = stat(path,
172 btrfs_detect(const char *path) argument
221 btrfs_subvolume_create(const char *path) argument
412 btrfs_do_destroy_subvol(const char *path) argument
463 create_my_btrfs_tree(u64 id, const char *path, int name_len) argument
553 do_remove_btrfs_children(struct my_btrfs_tree *tree, u64 root_id, const char *path) argument
589 btrfs_recursive_destroy(const char *path) argument
729 btrfs_try_remove_subvol(const char *path) argument
[all...]
/lxc/src/lxc/lsm/
H A Dapparmor.c86 char path[100], *space; local
92 ret = snprintf(path, 100, "/proc/%d/attr/current", pid);
94 ERROR("path name too long");
98 f = fopen(path, "r");
100 SYSERROR("opening %s", path);
117 ERROR("reading %s", path);

Completed in 41 milliseconds

12