[lxc-devel] [lxc/master] lxc-create: fix -B best option
brauner on Github
lxc-bot at linuxcontainers.org
Mon Apr 11 15:17:36 UTC 2016
A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 364 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20160411/17786e14/attachment.bin>
-------------- next part --------------
From fb5ab35bfae46f75e988df28da1edce8cbb5f27c Mon Sep 17 00:00:00 2001
From: Christian Brauner <christian.brauner at mailbox.org>
Date: Mon, 11 Apr 2016 17:13:16 +0200
Subject: [PATCH] lxc-create: fix -B best option
Signed-off-by: Christian Brauner <christian.brauner at mailbox.org>
---
src/lxc/lxc_create.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/lxc/lxc_create.c b/src/lxc/lxc_create.c
index 0634397..5fd5a29 100644
--- a/src/lxc/lxc_create.c
+++ b/src/lxc/lxc_create.c
@@ -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);
}
More information about the lxc-devel
mailing list