]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
lxc-copy: correct order of copy and original
authorChristian Brauner <christian.brauner@mailbox.org>
Tue, 1 Mar 2016 20:50:55 +0000 (21:50 +0100)
committerChristian Brauner <christian.brauner@mailbox.org>
Tue, 1 Mar 2016 21:00:09 +0000 (22:00 +0100)
lxc-copy -n ORIG -N COPY -e

accidently printed

"Created ORIG as clone of COPY"

instead of

"Created COPY as clone of ORIG".
Fix the ordering.

Signed-off-by: Christian Brauner <christian.brauner@mailbox.org>
src/lxc/lxc_copy.c

index 155a5883d5ad7e6b3cb8ce7ba169d10d973da8b7..003e8a1dfcf418a2ba130f786991500946c46190 100644 (file)
@@ -358,8 +358,7 @@ static int do_clone(struct lxc_container *c, char *newname, char *newpath,
                return -1;
        }
 
-       INFO("Created container %s as %s of %s\n", newname,
-            task ? "snapshot" : "copy", c->name);
+       INFO("Created %s as %s of %s\n", newname, task ? "snapshot" : "copy", c->name);
 
        lxc_container_put(clone);
 
@@ -421,7 +420,7 @@ static int do_clone_ephemeral(struct lxc_container *c,
                goto destroy_and_put;
 
        if (!my_args.quiet)
-               printf("Created %s as %s of %s\n", arg->name, "clone", arg->newname);
+               printf("Created %s as clone of %s\n", arg->newname, arg->name);
 
        if (!arg->daemonize && arg->argc) {
                clone->want_daemonize(clone, true);