summary refs log tree commit diff stats
path: root/qemu-io.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2010-01-20 18:13:42 +0100
committerAnthony Liguori <aliguori@us.ibm.com>2010-01-26 15:42:02 -0600
commit9a2d77ad0dd6b3e93669543b846a75c02878eba7 (patch)
treeb9c5bac76f770d1def9446c3853664197eb6e69f /qemu-io.c
parent6987307ca30aead67e8545934186c92f942710f6 (diff)
downloadfocaccia-qemu-9a2d77ad0dd6b3e93669543b846a75c02878eba7.tar.gz
focaccia-qemu-9a2d77ad0dd6b3e93669543b846a75c02878eba7.zip
block: kill BDRV_O_CREAT
The BDRV_O_CREAT option is unused inside qemu and partially duplicates
the bdrv_create method.  Remove it, and the -C option to qemu-io which
isn't used in qemu-iotests anyway.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'qemu-io.c')
-rw-r--r--qemu-io.c15
1 files changed, 3 insertions, 12 deletions
diff --git a/qemu-io.c b/qemu-io.c
index b159bc9c32..b2f2f5a9a9 100644
--- a/qemu-io.c
+++ b/qemu-io.c
@@ -1307,7 +1307,6 @@ open_help(void)
 " 'open -Cn /tmp/data' - creates/opens data file read-write and uncached\n"
 "\n"
 " Opens a file for subsequent use by all of the other qemu-io commands.\n"
-" -C, -- create new file if it doesn't exist\n"
 " -r, -- open file read-only\n"
 " -s, -- use snapshot file\n"
 " -n, -- disable host cache\n"
@@ -1337,7 +1336,7 @@ open_f(int argc, char **argv)
 	int growable = 0;
 	int c;
 
-	while ((c = getopt(argc, argv, "snCrg")) != EOF) {
+	while ((c = getopt(argc, argv, "snrg")) != EOF) {
 		switch (c) {
 		case 's':
 			flags |= BDRV_O_SNAPSHOT;
@@ -1345,9 +1344,6 @@ open_f(int argc, char **argv)
 		case 'n':
 			flags |= BDRV_O_NOCACHE;
 			break;
-		case 'C':
-			flags |= BDRV_O_CREAT;
-			break;
 		case 'r':
 			readonly = 1;
 			break;
@@ -1395,10 +1391,9 @@ init_check_command(
 static void usage(const char *name)
 {
 	printf(
-"Usage: %s [-h] [-V] [-Crsnm] [-c cmd] ... [file]\n"
+"Usage: %s [-h] [-V] [-rsnm] [-c cmd] ... [file]\n"
 "QEMU Disk exerciser\n"
 "\n"
-"  -C, --create         create new file if it doesn't exist\n"
 "  -c, --cmd            command to execute\n"
 "  -r, --read-only      export read-only\n"
 "  -s, --snapshot       use snapshot file\n"
@@ -1417,13 +1412,12 @@ int main(int argc, char **argv)
 {
 	int readonly = 0;
 	int growable = 0;
-	const char *sopt = "hVc:Crsnmgk";
+	const char *sopt = "hVc:rsnmgk";
         const struct option lopt[] = {
 		{ "help", 0, NULL, 'h' },
 		{ "version", 0, NULL, 'V' },
 		{ "offset", 1, NULL, 'o' },
 		{ "cmd", 1, NULL, 'c' },
-		{ "create", 0, NULL, 'C' },
 		{ "read-only", 0, NULL, 'r' },
 		{ "snapshot", 0, NULL, 's' },
 		{ "nocache", 0, NULL, 'n' },
@@ -1449,9 +1443,6 @@ int main(int argc, char **argv)
 		case 'c':
 			add_user_command(optarg);
 			break;
-		case 'C':
-			flags |= BDRV_O_CREAT;
-			break;
 		case 'r':
 			readonly = 1;
 			break;