Searched refs:path (Results 1 - 25 of 88) sorted by relevance

1234

/lxc/src/lxc/bdev/
H A Dlxclvm.h42 int lvm_detect(const char *path);
45 int lvm_compare_lv_attr(const char *path, int pos, const char expected);
46 int lvm_is_thin_volume(const char *path);
47 int lvm_is_thin_pool(const char *path);
48 int lvm_snapshot(const char *orig, const char *path, uint64_t size);
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 Dlxcnbd.h49 int nbd_detect(const char *path);
56 bool requires_nbd(const char *path);
H A Dlxczfs.h56 int zfs_detect(const char *path);
57 int zfs_list_entry(const char *path, char *output, size_t inlen);
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...]
H A Dlxcdir.h48 int dir_detect(const char *path);
H A Dlxcloop.h48 int loop_detect(const char *path);
H A Dlxcrbd.h48 int rbd_detect(const char *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 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...]
/lxc/src/lxc/
H A Daf_unix.h28 extern int lxc_abstract_unix_open(const char *path, int type, int flags);
31 extern int lxc_abstract_unix_connect(const char *path);
H A Dconf.c543 char path[MAXPATHLEN]; local
545 loopfd = lxc_prepare_loop_dev(rootfs, path, LO_FLAGS_AUTOCLEAR);
548 DEBUG("prepared loop device \"%s\"", path);
550 ret = mount_unknown_fs(path, target, options);
553 DEBUG("mounted rootfs \"%s\" on loop device \"%s\" via loop device \"%s\"", rootfs, target, path);
697 source = lxc_string_replace("%r", conf->rootfs.path ? conf->rootfs.mount : "", default_mounts[i].source);
709 destination = lxc_string_replace("%r", conf->rootfs.path ? conf->rootfs.mount : "", default_mounts[i].destination);
719 r = safe_mount(source, destination, default_mounts[i].fstype, mflags, default_mounts[i].options, conf->rootfs.path ? conf->rootfs.mount : NULL);
763 if (!cgroup_mount(conf->rootfs.path ? conf->rootfs.mount : "", handler, cg_flags)) {
790 SYSERROR("Failed to get real path fo
844 char path[MAXPATHLEN]; local
904 char path[MAXPATHLEN], lxcpath[MAXPATHLEN]; local
1052 char *path; local
1118 char path[MAXPATHLEN]; local
1442 char path[MAXPATHLEN]; local
1502 char path[MAXPATHLEN], lxcpath[MAXPATHLEN]; local
1854 mount_entry_create_dir_file(const struct mntent *mntent, const char* path, const struct lxc_rootfs *rootfs, const char *lxc_name, const char *lxc_path) argument
1897 mount_entry_on_generic(struct mntent *mntent, const char* path, const struct lxc_rootfs *rootfs, const char *lxc_name, const char *lxc_path) argument
1932 char path[MAXPATHLEN]; local
1956 char path[MAXPATHLEN]; local
2003 char path[MAXPATHLEN]; local
3264 char path[PATH_MAX]; local
3290 char *path; local
3609 chown_mapped_root(char *path, struct lxc_conf *conf) argument
3823 char path[PATH_MAX], destpath[PATH_MAX], *p; local
3875 const char *path = conf->rootfs.mount; local
3902 char path[MAXPATHLEN]; local
[all...]
H A Dinitutils.h52 FILE *fopen_cloexec(const char *path, const char *mode);
H A Dcriu.c83 /* The path that is bind mounted from /dev/console, if any. We don't
85 * device may have a different path (e.g. if the pty number is
97 char path[PATH_MAX]; local
100 ret = snprintf(path, sizeof(path), "%s/tty.info", directory);
101 if (ret < 0 || ret >= sizeof(path)) {
106 f = fopen(path, "r");
115 SYSERROR("couldn't open %s", path);
121 SYSERROR("couldn't read %s", path);
165 /* --prev-images-dir <path
266 char *path; local
637 char *path; local
1012 char path[PATH_MAX]; local
1165 char path[PATH_MAX]; local
[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 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...]
/lxc/src/python-lxc/
H A Dsetup.py.in25 import os, os.path
48 # run this script from there, but write the build products to the correct path.
51 # all the path variables to their forms relative to srcdir.
53 srcdir, builddir, top_srcdir, top_builddir = map(os.path.abspath,
56 builddir, top_srcdir, top_builddir = map(lambda d: os.path.relpath(d, srcdir),
62 include_dirs=[os.path.join(top_srcdir, 'src'),
63 os.path.join(top_builddir, 'src')],
64 library_dirs=[os.path.join(top_builddir, 'src/lxc/.libs/')],
74 options={'build': {'build_base': os.path.join(builddir, 'build')}})
/lxc/config/apparmor/
H A Dlxc-generate-aa-rules.py11 # blocks[0] = ['path' = '/sys', 'children' = [A,B] ]
12 # blocks[1] = ['path' = '/proc/sys', 'children' = [ E ] ]
13 # A = [ 'path' = 'fs', children = [C] ]
14 # C = [ 'path' = 'cgroup', children = [F] ]
15 # B = [ 'path' = 'class', children = [D] ]
16 # D = [ 'path' = 'net', children = [F] ]
17 # E = [ 'path' = 'shm*' ]
18 # F = [ 'path' = '**' ]
21 def add_block(path):
23 if b['path']
[all...]
/lxc/templates/
H A Dlxc-ubuntu-cloud.in51 path=$1
63 nics=`grep -e '^lxc\.network\.type[ \t]*=[ \t]*veth' $path/config | wc -l`
65 grep -q "^lxc.network.hwaddr" $path/config || sed -i -e "/^lxc\.network\.type[ \t]*=[ \t]*veth/a lxc.network.hwaddr = 00:16:3e:$(openssl rand -hex 3| sed 's/\(..\)/\1:/g; s/.$//')" $path/config
70 sed -i -e "/lxc.network/{w ${path}/config-network" -e "d}" $path/config
73 sed -i -e "/lxc./{w ${path}/config-auto" -e "d}" $path/config
76 echo "" >> $path/config
77 echo "# Common configuration" >> $path/confi
[all...]
H A Dlxc-ubuntu.in51 # Check if given path is in a btrfs partition
57 # Check if given path is the root of a btrfs subvolume
65 path=$1
66 [ -d $path ] && return 0
67 mkdir -p $(dirname $path)
68 if which btrfs >/dev/null 2>&1 && is_btrfs $(dirname $path); then
69 btrfs subvolume create $path
71 mkdir -p $path
77 path=$1
78 [ -d $path ] || retur
[all...]
H A Dlxc-sshd.in124 path=$1
130 grep -q "^lxc.rootfs" $path/config 2>/dev/null || echo "lxc.rootfs = $rootfs" >> $path/config
131 cat <<EOF >> $path/config
153 cat <<EOF >> $path/config
159 cat <<EOF >> $path/config
165 grep -q "^lxc.network.ipv4" $path/config || touch $rootfs/run-dhcp
168 cat <<EOF >> $path/config
177 $1 -h|--help -p|--path=<path> [
[all...]
H A Dlxc-busybox.in103 echo "lxc.mount.entry = /dev/$dev dev/$dev none bind,optional,create=file 0 0" >> $path/config
338 path=$1
342 grep -q "^lxc.rootfs" $path/config 2>/dev/null || echo "lxc.rootfs = $rootfs" >> $path/config
343 cat <<EOF >> $path/config
366 echo "lxc.mount.entry = /$dir $dir none ro,bind 0 0" >> $path/config
369 echo "lxc.mount.entry = /sys/kernel/security sys/kernel/security none ro,bind,optional 0 0" >>$path/config
374 path=$1
377 chown $LXC_MAPPED_UID $path/config >/dev/null 2>&1
378 chown -R root $path/rootf
[all...]
/lxc/src/lxc/tools/
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_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...]
/lxc/src/lxc/cgroups/
H A Dcgfsng.c66 * @base_cgroup: the cgroup under which the container cgroup path
426 static bool filter_and_set_cpus(char *path, bool am_initialized) argument
437 lastslash = strrchr(path, '/');
439 ERROR("Invalid path: %s.", path);
444 fpath = must_make_path(path, "cpuset.cpus", NULL);
538 fpath = must_make_path(path, "cpuset.cpus", NULL);
562 /* Copy contents of parent(@path)/@file to @path/@file */
563 static bool copy_parent_file(char *path, cha argument
930 test_writeable(char *mountpoint, char *path) argument
1267 char *path = data; local
1279 recursive_destroy(char *path, struct lxc_conf *conf) argument
1455 char *fullpath, *path = hierarchies[i]->fullcgpath; local
1679 char *path; local
1721 char *path; local
1836 char *path, *fullpath; local
1863 char *subsystem, *p, *path; local
1895 char *subsystem, *p, *path; local
[all...]

Completed in 81 milliseconds

1234