/lxc/src/lxc/bdev/ |
H A D | lxcrsync.c | 97 *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 D | lxcdir.c | 36 * 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 D | lxcloop.c | 46 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 D | lxcrbd.c | 38 int rbd_clonepaths(struct bdev *orig, struct bdev *new, const char *oldname, argument
|
H A D | lxcaufs.c | 43 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 D | lxclvm.c | 278 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 D | lxcnbd.c | 90 int nbd_clonepaths(struct bdev *orig, struct bdev *new, const char *oldname, argument
|
H A D | lxczfs.c | 204 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 D | lxcbtrfs.c | 258 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 D | bdev.c | 248 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 D | lxcoverlay.c | 49 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...] |
/lxc/src/lxc/ |
H A D | list.h | 100 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 D | network.c | 189 lxc_netdev_rename_by_name_in_netns(pid_t pid, const char *old, const char *new) argument 199 exit(lxc_netdev_rename_by_name(old, new));
|
H A D | confile.c | 2766 char *new; local 2771 new = realloc(conf->unexpanded_config, newlen + 1); 2772 if (!new) { 2778 new[newlen - 1] = '\0'; 2779 lend = new + (lend - conf->unexpanded_config); 2781 memmove(new + poffset + newdirlen, 2782 new + poffset + olddirlen, 2784 conf->unexpanded_config = new; 2785 memcpy(new + poffset, newdir, newdirlen); 2847 char *new; local [all...] |
H A D | conf.c | 994 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...] |
H A D | lxccontainer.c | 1129 * create our new array, pre-pend the template name and 1520 /* save config file again to store the new rootfs location */ 2133 ERROR("Error writing new snapshots value"); 2144 * using the new format. */ 2151 ERROR("Error writing new snapshots entry"); 2285 INFO("Container uses new lxc-snapshots format %s", path); 2548 ERROR("Out of memory setting new lxc path"); 2560 ERROR("Out of memory setting new config filename"); 2626 static int copy_file(const char *old, const char *new) argument 2633 if (file_exists(new)) { [all...] |
/lxc/src/lxc/tools/ |
H A D | lxc_clone.c | 78 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/hooks/ |
H A D | unmount-namespace.c | 129 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/lua-lxc/ |
H A D | lxc.lua | 77 function container:new(lname, config) 368 local ct = container:new(dir) 386 local ct = container:new(name)
|
/lxc/src/lxc/cgroups/ |
H A D | cgfsng.c | 25 * cgfs-ng.c: this is a new, simplified implementation of a filesystem 32 * This new implementation assumes that cgroup filesystems are mounted 168 * add one entry, and point the new entry to NULL. Do not fail. Return 275 static void append_line(char **dest, size_t oldlen, char *new, size_t newlen) argument 281 memcpy(*dest + oldlen, new, newlen + 1); 815 struct hierarchy *new; local 818 new = must_alloc(sizeof(*new)); 819 new->controllers = clist; 820 new [all...] |