Skip to content

Commit

Permalink
Revert "storage: handle prefixed rootfs paths"
Browse files Browse the repository at this point in the history
This reverts commit 84ae4b6.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
  • Loading branch information
Christian Brauner committed Aug 15, 2017
1 parent d8b94f1 commit 4e30cce
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/lxc/bdev/lxcoverlay.c
Expand Up @@ -58,8 +58,6 @@ int ovl_clonepaths(struct bdev *orig, struct bdev *new, const char *oldname,
const char *cname, const char *oldpath, const char *lxcpath,
int snap, uint64_t newsize, struct lxc_conf *conf)
{
char *src;

if (!snap) {
ERROR("overlayfs is only for snapshot clones");
return -22;
Expand Down Expand Up @@ -135,15 +133,14 @@ int ovl_clonepaths(struct bdev *orig, struct bdev *new, const char *oldname,
WARN("Failed to update ownership of %s", work);
free(work);

src = lxc_storage_get_path(orig->src, orig->type);
// the src will be 'overlayfs:lowerdir:upperdir'
len = strlen(delta) + strlen(src) + 12;
len = strlen(delta) + strlen(orig->src) + 12;
new->src = malloc(len);
if (!new->src) {
free(delta);
return -ENOMEM;
}
ret = snprintf(new->src, len, "overlayfs:%s:%s", src, delta);
ret = snprintf(new->src, len, "overlayfs:%s:%s", orig->src, delta);
free(delta);
if (ret < 0 || ret >= len)
return -ENOMEM;
Expand Down

0 comments on commit 4e30cce

Please sign in to comment.