Lines Matching defs:new
258 int btrfs_same_fs(const char *orig, const char *new)
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)
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, const char *oldname,
376 new->src = malloc(len);
377 if (!new->src)
379 ret = snprintf(new->src, len, "%s/%s/rootfs", lxcpath, cname);
384 if ((new->src = dir_new_path(orig->src, oldname, cname, oldpath, lxcpath)) == NULL)
389 if ((new->dest = strdup(new->src)) == NULL)
392 if (orig->mntopts && (new->mntopts = strdup(orig->mntopts)) == NULL)
398 return btrfs_snapshot(orig->dest, new->dest);
399 sdata.dest = new->dest;
404 if (rmdir(new->dest) < 0 && errno != ENOENT) {
405 SYSERROR("removing %s", new->dest);
409 return btrfs_subvolume_create(new->dest);