Searched refs:new (Results 1 - 25 of 42) sorted by relevance

12

/lxc/src/lxc/bdev/
H A Dlxcrsync.c97 *new = data->new; local
115 if (new->ops->mount(new) < 0) {
116 ERROR("failed mounting %s onto %s", new->src, new->dest);
129 if (do_rsync(orig->dest, new->dest) < 0) {
130 ERROR("rsyncing %s to %s", orig->src, new->src);
H A Dlxcdir.c36 * name and paths for the new
38 int dir_clonepaths(struct bdev *orig, struct bdev *new, const char *oldname, argument
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)
H A Dlxcrsync.h32 struct bdev *new;
H A Dlxcdir.h42 int dir_clonepaths(struct bdev *orig, struct bdev *new, const char *oldname,
H A Dlxcloop.h42 int loop_clonepaths(struct bdev *orig, struct bdev *new, const char *oldname,
H A Dlxclvm.c278 int lvm_clonepaths(struct bdev *orig, struct bdev *new, const char *oldname, argument
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)
311 new->mntopts = strdup(orig->mntopts);
312 if (!new->mntopts)
317 new->dest = malloc(len);
318 if (!new->dest)
320 ret = snprintf(new
[all...]
H A Dlxcrbd.h42 int rbd_clonepaths(struct bdev *orig, struct bdev *new, const char *oldname,
H A Dlxcaufs.c43 int aufs_clonepaths(struct bdev *orig, struct bdev *new, const char *oldname, argument
55 new->dest = dir_new_path(orig->dest, oldname, cname, oldpath, lxcpath);
56 if (!new->dest)
58 if (mkdir_p(new->dest, 0755) < 0)
61 if (am_unpriv() && chown_mapped_root(new->dest, conf) < 0)
62 WARN("Failed to update ownership of %s", new->dest);
70 lastslash = strrchr(new->dest, '/');
76 lastslashidx = lastslash - new->dest;
81 strncpy(delta, new->dest, lastslashidx+1);
93 new
[all...]
H A Dlxcloop.c46 int loop_clonepaths(struct bdev *orig, struct bdev *new, const char *oldname, argument
69 new->src = malloc(len + 5);
70 if (!new->src)
72 ret = snprintf(new->src, len + 5, "loop:%s", srcdev);
76 new->dest = malloc(len);
77 if (!new->dest)
79 ret = snprintf(new->dest, len, "%s/%s/rootfs", lxcpath, cname);
209 // create the new loopback file.
214 SYSERROR("Error seeking to set new loop file size");
219 SYSERROR("Error creating new loo
[all...]
H A Dlxcoverlay.c49 static int ovl_do_rsync(struct bdev *orig, struct bdev *new,
57 int ovl_clonepaths(struct bdev *orig, struct bdev *new, const char *oldname, argument
69 new->dest = dir_new_path(orig->dest, oldname, cname, oldpath, lxcpath);
70 if (!new->dest)
72 if (mkdir_p(new->dest, 0755) < 0)
75 if (am_unpriv() && chown_mapped_root(new->dest, conf) < 0)
76 WARN("Failed to update ownership of %s", new->dest);
89 lastslash = strrchr(new->dest, '/');
95 lastslashidx = lastslash - new->dest;
100 strncpy(delta, new
745 ovl_do_rsync(struct bdev *orig, struct bdev *new, struct lxc_conf *conf) argument
[all...]
H A Dlxclvm.h49 int lvm_clonepaths(struct bdev *orig, struct bdev *new, const char *oldname,
H A Dlxcnbd.h43 int nbd_clonepaths(struct bdev *orig, struct bdev *new, const char *oldname,
H A Dlxczfs.h45 int zfs_clonepaths(struct bdev *orig, struct bdev *new, const char *oldname,
H A Dlxcbtrfs.c258 int btrfs_same_fs(const char *orig, const char *new) argument
274 fd_new = open(new, O_RDONLY);
276 SYSERROR("Error opening new container dir %s", new);
282 SYSERROR("BTRFS_IOC_FS_INFO %s", new);
299 int btrfs_snapshot(const char *orig, const char *new) argument
305 newfull = strdup(new);
312 SYSERROR("Error removing empty new rootfs");
324 SYSERROR("Error opening new container dir %s", newdir);
360 int btrfs_clonepaths(struct bdev *orig, struct bdev *new, cons argument
[all...]
H A Dlxczfs.c204 int zfs_clonepaths(struct bdev *orig, struct bdev *new, const char *oldname, argument
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, oldname, cname, lxcpath, snap);
H A Dlxcaufs.h51 int aufs_clonepaths(struct bdev *orig, struct bdev *new, const char *oldname,
H A Dlxcoverlay.h53 int ovl_clonepaths(struct bdev *orig, struct bdev *new, const char *oldname,
H A Dbdev.c248 p += sprintf(p, "%s", name); // print new name in place of oldname
293 * the original, mount the new, and rsync the contents.
299 struct bdev *orig, *new; local
311 * we don't know how to come up with a new name
379 new = bdev_get(bdevtype ? bdevtype : orig->type);
380 if (!new) {
386 if (new->ops->clone_paths(orig, new, oldname, cname, oldpath, lxcpath,
392 if (am_unpriv() && chown_mapped_root(new->src, c0->lxc_conf) < 0)
393 WARN("Failed to update ownership of %s", new
[all...]
H A Dbdev.h76 int (*clone_paths)(struct bdev *orig, struct bdev *new, const char *oldname,
/lxc/src/python-lxc/
H A Dsetup.py.in33 new = []
36 if "-fPIC" not in new:
37 new.append("-fPIC")
39 new.append(flag)
41 os.environ[var] = " ".join(new)
/lxc/hooks/
H A Dunmount-namespace.c129 struct mount *new; local
132 new = (struct mount*)realloc(mounts, capacity * sizeof(*mounts));
133 if (!new)
135 mounts = new;
137 new = &mounts[count++];
138 new->src = strdup(ent->mnt_fsname);
139 new->dst = strdup(ent->mnt_dir);
140 new->fs = strdup(ent->mnt_type);
141 if (!new->src || !new
[all...]
/lxc/src/lxc/
H A Dlist.h100 static inline void __lxc_list_add(struct lxc_list *new, argument
104 next->prev = new;
105 new->next = next;
106 new->prev = prev;
107 prev->next = new;
H A Dconf.c994 SYSERROR("Error opening new-/ for fchdir");
998 /* change into new root fs */
1000 SYSERROR("can't chdir to new rootfs '%s'", rootfs);
1004 /* pivot_root into our new root fs */
1011 * at this point the old-root is mounted on top of our new-root
1297 /* It is weird, but chdir("..") moves us in a new root */
1344 DEBUG("no new devpts instance will be mounted since no pts "
1367 /* Mount new devpts instance. */
1370 SYSERROR("failed to mount new devpts instance");
2355 /* get the new ifinde
2581 struct lxc_conf *new; local
4491 struct lxc_list *new = NULL, *tmp, *it, *next; local
[all...]
/lxc/src/lxc/tools/
H A Dlxc_clone.c78 printf(" [-p lxcpath] [-P newlxcpath] orig new\n");
81 printf(" -B: use specified new backingstore. Default is the same as\n");
88 printf(" -M: Keep macaddr - do not choose a random new mac address\n");
90 printf(" -P: create container new in custom lxcpath\n");
100 { "new", required_argument, 0, 'n'},
119 char *orig = NULL, *new = NULL, *vgname = NULL; local
138 case 'n': new = optarg; break;
152 if (optind < argc && !new)
153 new = argv[optind++];
157 if (!new || !ori
[all...]
/lxc/src/lua-lxc/test/
H A Dapitest.lua82 container = lxc.container:new(optarg["n"])
94 -- create a config file in the new location from container's config
97 cfgcontainer = lxc.container:new(optarg["n"], "/tmp")

Completed in 1355 milliseconds

12