]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
lxc-create: fix -B best option 963/head
authorChristian Brauner <christian.brauner@mailbox.org>
Mon, 11 Apr 2016 15:13:16 +0000 (17:13 +0200)
committerChristian Brauner <christian.brauner@mailbox.org>
Mon, 11 Apr 2016 15:15:21 +0000 (17:15 +0200)
Signed-off-by: Christian Brauner <christian.brauner@mailbox.org>
src/lxc/lxc_create.c

index 06343975612d3fbb5dfaf0c0ddb8f0da8a2669d9..5fd5a296624ba8375bafca075ee6f30d968090ea 100644 (file)
@@ -241,7 +241,9 @@ int main(int argc, char *argv[])
                my_args.bdevtype = "dir";
 
        // Final check whether the user gave use a valid bdev type.
-       if (!is_valid_bdev_type(my_args.bdevtype) && strcmp(my_args.bdevtype, "_unset")) {
+       if (strcmp(my_args.bdevtype, "best") &&
+           strcmp(my_args.bdevtype, "_unset") &&
+           !is_valid_bdev_type(my_args.bdevtype)) {
                fprintf(stderr, "%s is not a valid backing storage type.\n", my_args.bdevtype);
                exit(EXIT_FAILURE);
        }