Searched refs:src (Results 1 - 21 of 21) sorted by relevance

/lxc/src/lxc/bdev/
H A Dlxcdir.c49 if (!orig->dest || !orig->src)
53 new->src = malloc(len);
54 if (!new->src)
56 ret = snprintf(new->src, len, "%s/%s/rootfs", lxcpath, cname);
59 if ((new->dest = strdup(new->src)) == NULL)
69 bdev->src = strdup(specs->dir);
71 bdev->src = strdup(dest);
73 if (!bdev->src || !bdev->dest) {
78 if (mkdir_p(bdev->src, 0755) < 0) {
79 ERROR("Error creating %s", bdev->src);
[all...]
H A Dlxcrsync.h36 char *src; member in struct:rsync_data_char
40 int do_rsync(const char *src, const char *dest);
H A Dlxcrbd.c67 bdev->src = malloc(len);
68 if (!bdev->src)
71 ret = snprintf(bdev->src, len, "/dev/rbd/%s/%s", rbdpool, rbdname);
107 if (do_mkfs(bdev->src, fstype) < 0) {
109 bdev->src);
128 if ( file_exists(orig->src) ) {
132 execlp("rbd", "rbd", "unmap" , orig->src, (char *)NULL);
142 rbdfullname = alloca(strlen(orig->src) - 8);
143 strcpy( rbdfullname, &orig->src[9] );
162 if (!bdev->src || !bde
[all...]
H A Dlxcrsync.c43 int do_rsync(const char *src, const char *dest) argument
56 l = strlen(src) + 2;
60 strcpy(s, src);
80 if (do_rsync(data->src, data->dest) < 0) {
81 ERROR("rsyncing %s to %s", data->src, data->dest);
112 ERROR("failed mounting %s onto %s", orig->src, orig->dest);
116 ERROR("failed mounting %s onto %s", new->src, new->dest);
130 ERROR("rsyncing %s to %s", orig->src, new->src);
H A Dlxcloop.c60 if (!orig->dest || !orig->src)
69 new->src = malloc(len + 5);
70 if (!new->src)
72 ret = snprintf(new->src, len + 5, "loop:%s", srcdev);
83 // it's tempting to say: if orig->src == loopback and !newsize, then
89 ERROR("Error getting size of %s", orig->src);
93 INFO("could not find fstype for %s, using %s", orig->src,
118 // src will be 'loop:$srcdev'
127 bdev->src = malloc(len + 5);
128 if (!bdev->src)
[all...]
H A Dlxclvm.c48 extern char *dir_new_path(char *src, const char *oldname, const char *name,
166 if (!bdev->src || !bdev->dest)
170 return mount_unknown_fs(bdev->src, bdev->dest, bdev->mntopts);
177 if (!bdev->src || !bdev->dest)
286 if (!orig->src || !orig->dest)
299 if ((new->src = malloc(len)) == NULL)
301 ret = snprintf(new->src, len, "/dev/%s/%s", vg, cname);
305 new->src = dir_new_path(orig->src, oldname, cname, oldpath, lxcpath);
306 if (!new->src)
[all...]
H A Dlxcaufs.c40 extern char *dir_new_path(char *src, const char *oldname, const char *name,
52 if (!orig->src || !orig->dest)
91 // the src will be 'aufs:lowerdir:upperdir'
92 len = strlen(delta) + strlen(orig->src) + 12;
93 new->src = malloc(len);
94 if (!new->src) {
98 ret = snprintf(new->src, len, "aufs:%s:%s", orig->src, delta);
109 if (!(osrc = strdup(orig->src)))
133 rdata.src
[all...]
H A Dlxczfs.c91 if (!bdev->src || !bdev->dest)
101 int ret = mount(bdev->src, bdev->dest, "bind", MS_BIND | MS_REC | mntflags, mntdata);
112 if (!bdev->src || !bdev->dest)
210 if (!orig->src || !orig->dest)
219 new->src = malloc(len);
220 if (!new->src)
223 ret = snprintf(new->src, len, "%s/%s/rootfs", lxcpath, cname);
227 if ((new->dest = strdup(new->src)) == NULL)
230 return zfs_clone(orig->src, new->src, oldnam
[all...]
H A Dlxcnbd.c50 static int nbd_get_partition(const char *src);
53 bool attach_nbd(char *src, struct lxc_conf *conf) argument
55 char *orig = alloca(strlen(src)+1), *p, path[50];
58 strcpy(orig, src);
122 if (!bdev->src || !bdev->dest)
128 partition = nbd_get_partition(bdev->src);
146 ERROR("Error mounting %s", bdev->src);
157 if (!bdev->src || !bdev->dest)
286 static int nbd_get_partition(const char *src) argument
288 char *p = strchr(src, '
[all...]
H A Dbdev.c204 static const struct bdev_type *bdev_query(struct lxc_conf *conf, const char *src);
214 char *dir_new_path(char *src, const char *oldname, const char *name, argument
220 nlen = strlen(src) + 1;
222 p = src;
223 /* if src starts with oldpath, look for oldname only after
225 if (strncmp(src, oldpath, l1) == 0) {
240 if (strncmp(src, oldpath, l1) == 0) {
242 src += l1;
245 while ((p2 = strstr(src, oldname)) != NULL) {
246 strncpy(p, src, p
305 const char *src = c0->lxc_conf->rootfs.path; local
533 bdev_init(struct lxc_conf *conf, const char *src, const char *dst, const char *mntopts) argument
857 bdev_query(struct lxc_conf *conf, const char *src) argument
[all...]
H A Dlxcnbd.h54 bool attach_nbd(char *src, struct lxc_conf *conf);
H A Dlxcoverlay.c45 extern char *dir_new_path(char *src, const char *oldname, const char *name,
66 if (!orig->src || !orig->dest)
136 // the src will be 'overlayfs:lowerdir:upperdir'
137 len = strlen(delta) + strlen(orig->src) + 12;
138 new->src = malloc(len);
139 if (!new->src) {
143 ret = snprintf(new->src, len, "overlayfs:%s:%s", orig->src, delta);
156 if (!(osrc = strdup(orig->src)))
212 new->src
[all...]
H A Dlxcbtrfs.c47 extern char *dir_new_path(char *src, const char *oldname, const char *name,
199 if (!bdev->src || !bdev->dest)
207 ret = mount(bdev->src, bdev->dest, "bind", MS_BIND | MS_REC | mntflags, mntdata);
216 if (!bdev->src || !bdev->dest)
357 return btrfs_snapshot(arg->src, arg->dest);
365 if (!orig->dest || !orig->src)
376 new->src = malloc(len);
377 if (!new->src)
379 ret = snprintf(new->src, len, "%s/%s/rootfs", lxcpath, cname);
384 if ((new->src
[all...]
H A Dbdev.h69 // mount requires src and dest to be set.
84 * When lxc-start (conf.c) is mounting a rootfs, then src will be the
93 char *src; member in struct:bdev
107 * Instantiate a bdev object. The src is used to determine which blockdev
111 * Optionally, src can be 'dir:/var/lib/lxc/c1' or 'lvm:/dev/lxc/c1'. For
117 struct bdev *bdev_init(struct lxc_conf *conf, const char *src, const char *dst,
/lxc/hooks/
H A Dunmount-namespace.c40 #include <../src/config.h>
43 #include <../src/include/lxcmntent.h>
68 char *src; /* currently not used */ member in struct:mount
74 free(mnt->src);
138 new->src = strdup(ent->mnt_fsname);
141 if (!new->src || !new->dst || !new->fs)
154 free(mounts[count].src);
/lxc/src/lxc/tools/
H A Dlxc_copy.c63 char *src; member in struct:mnts
105 --name=NAME [-P lxcpath] [-N newname] [-p newpath] [-B backingstorage] -e [-d] [-D] [-K] [-M] [-m {bind,aufs,overlay}=/src:/dest] -- hook options\n\
120 {bind,aufs,overlay}=/src-path or {bind,aufs,overlay}=/src-path:/dst-path\n\
315 2 * strlen(m->src) + strlen(m->dest) + strlen(m->upper) +
323 m->src, m->dest, m->upper, m->src, m->workdir);
328 2 * strlen(m->src) + strlen(m->dest) + strlen(m->upper) +
336 m->src, m->dest, m->src,
[all...]
/lxc/src/lxc/
H A Dutils.h327 int safe_mount(const char *src, const char *dest, const char *fstype,
H A Dutils.c1687 int safe_mount(const char *src, const char *dest, const char *fstype, argument
1692 const char *mntsrc = src;
1698 if (flags & MS_BIND && src && src[0] != '/') {
1700 srcfd = open_without_symlink(src, NULL);
1738 SYSERROR("Failed to mount %s onto %s", src, dest);
H A Dlxccontainer.c1044 do_lxcapi_set_config_item(c, "lxc.rootfs", bdev->src);
1125 bdev->dest = strdup(bdev->src);
2871 c->lxc_conf->rootfs.path = strdup(bdev->src);
2972 bdev->dest = strdup(bdev->src);
H A Dconf.c1735 * skip @nfields spaces in @src
1737 static char *get_field(char *src, int nfields) argument
1739 char *p = src;
/lxc/templates/
H A Dlxc-slackware.in69 if [ -d $T_PX/usr/src/linux ]; then
70 chmod 755 $T_PX/usr/src/linux

Completed in 57 milliseconds