From: Andrey Shinkevich <andrey.shinkevich@virtuozzo.com>
To: qemu-block@nongnu.org
Cc: kwolf@redhat.com, vsementsov@virtuozzo.com, armbru@redhat.com,
qemu-devel@nongnu.org, andrey.shinkevich@virtuozzo.com,
den@openvz.org, mreitz@redhat.com
Subject: [PATCH v3 2/3] qemu-img: sort key options alphabetically
Date: Tue, 14 Jan 2020 11:22:16 +0300 [thread overview]
Message-ID: <1578990137-308222-3-git-send-email-andrey.shinkevich@virtuozzo.com> (raw)
In-Reply-To: <1578990137-308222-1-git-send-email-andrey.shinkevich@virtuozzo.com>
Put qemu-img key options in the alphabetical order in the code
for a faster finding.
Suggested-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Andrey Shinkevich <andrey.shinkevich@virtuozzo.com>
---
qemu-img.c | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/qemu-img.c b/qemu-img.c
index 6233b8c..c86f760 100644
--- a/qemu-img.c
+++ b/qemu-img.c
@@ -703,7 +703,7 @@ static int img_check(int argc, char **argv)
{"force-share", no_argument, 0, 'U'},
{0, 0, 0, 0}
};
- c = getopt_long(argc, argv, ":hf:r:T:qU",
+ c = getopt_long(argc, argv, ":f:hqr:T:U",
long_options, &option_index);
if (c == -1) {
break;
@@ -715,11 +715,14 @@ static int img_check(int argc, char **argv)
case '?':
unrecognized_option(argv[optind - 1]);
break;
+ case 'f':
+ fmt = optarg;
+ break;
case 'h':
help();
break;
- case 'f':
- fmt = optarg;
+ case 'q':
+ quiet = true;
break;
case 'r':
flags |= BDRV_O_RDWR;
@@ -733,18 +736,15 @@ static int img_check(int argc, char **argv)
"(expecting 'leaks' or 'all'): %s", optarg);
}
break;
- case OPTION_OUTPUT:
- output = optarg;
- break;
case 'T':
cache = optarg;
break;
- case 'q':
- quiet = true;
- break;
case 'U':
force_share = true;
break;
+ case OPTION_IMAGE_OPTS:
+ image_opts = true;
+ break;
case OPTION_OBJECT: {
QemuOpts *opts;
opts = qemu_opts_parse_noisily(&qemu_object_opts,
@@ -753,8 +753,8 @@ static int img_check(int argc, char **argv)
return 1;
}
} break;
- case OPTION_IMAGE_OPTS:
- image_opts = true;
+ case OPTION_OUTPUT:
+ output = optarg;
break;
}
}
--
1.8.3.1
next prev parent reply other threads:[~2020-01-14 8:23 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-14 8:22 [PATCH v3 0/3] Dump QCOW2 metadata Andrey Shinkevich
2020-01-14 8:22 ` [PATCH v3 1/3] qcow2: introduce Qcow2Metadata structure Andrey Shinkevich
2020-01-17 16:06 ` Vladimir Sementsov-Ogievskiy
2020-01-14 8:22 ` Andrey Shinkevich [this message]
2020-01-14 8:22 ` [PATCH v3 3/3] qcow2: dump QCOW2 metadata Andrey Shinkevich
2020-02-20 11:58 ` [PATCH v3 0/3] Dump " Max Reitz
2020-02-20 12:10 ` Vladimir Sementsov-Ogievskiy
2020-02-25 16:16 ` Max Reitz
2020-02-20 12:28 ` Kevin Wolf
2020-02-22 13:09 ` Eric Blake
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1578990137-308222-3-git-send-email-andrey.shinkevich@virtuozzo.com \
--to=andrey.shinkevich@virtuozzo.com \
--cc=armbru@redhat.com \
--cc=den@openvz.org \
--cc=kwolf@redhat.com \
--cc=mreitz@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=vsementsov@virtuozzo.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).