From: Stefan Hajnoczi <stefanha@redhat.com>
To: qemu-devel@nongnu.org
Cc: Peter Maydell <peter.maydell@linaro.org>,
Prasad Joshi <prasadjoshi.linux@gmail.com>,
Stefan Hajnoczi <stefanha@redhat.com>,
Anthony Liguori <aliguori@amazon.com>
Subject: [Qemu-devel] [PULL for-2.0 2/5] qemu-img: mandate argument to 'qemu-img check --repair'
Date: Tue, 25 Mar 2014 15:51:32 +0100 [thread overview]
Message-ID: <1395759095-11276-3-git-send-email-stefanha@redhat.com> (raw)
In-Reply-To: <1395759095-11276-1-git-send-email-stefanha@redhat.com>
From: Prasad Joshi <prasadjoshi.linux@gmail.com>
qemu-img check --repair option accepts an argument. The argument to
--repair switch can either be 'all' or 'leak'. Fix the long option to
mandate argument with --repair switch.
The patch fixes following segmentation fault
Core was generated by `qemu-img check -f qcow2 --repair all t.qcow2'.
Program terminated with signal 11, Segmentation fault.
0 in img_check (argc=6, argv=0x7fffab9b8a10) at qemu-img.c:588
588 if (!strcmp(optarg, "leaks")) {
(gdb) bt
0 img_check (argc=6, argv=0x7fffab9b8a10) at qemu-img.c:588
1 __libc_start_main () from /lib/x86_64-linux-gnu/libc.so.6
2 _start ()
(gdb)
Signed-off-by: Prasad Joshi <prasadjoshi.linux@gmail.com>
Reviewed-by: Leandro Dorileo <l@dorileo.org>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
---
qemu-img.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/qemu-img.c b/qemu-img.c
index 2e40cc1..77d946b 100644
--- a/qemu-img.c
+++ b/qemu-img.c
@@ -565,7 +565,7 @@ static int img_check(int argc, char **argv)
static const struct option long_options[] = {
{"help", no_argument, 0, 'h'},
{"format", required_argument, 0, 'f'},
- {"repair", no_argument, 0, 'r'},
+ {"repair", required_argument, 0, 'r'},
{"output", required_argument, 0, OPTION_OUTPUT},
{0, 0, 0, 0}
};
--
1.8.5.3
next prev parent reply other threads:[~2014-03-25 15:51 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-25 14:51 [Qemu-devel] [PULL for-2.0 0/5] Block patches Stefan Hajnoczi
2014-03-25 14:51 ` [Qemu-devel] [PULL for-2.0 1/5] osdep: initialize glib threads in all QEMU tools Stefan Hajnoczi
2014-03-25 14:51 ` Stefan Hajnoczi [this message]
2014-03-25 14:51 ` [Qemu-devel] [PULL for-2.0 3/5] Fixed various typos Stefan Hajnoczi
2014-03-25 14:51 ` [Qemu-devel] [PULL for-2.0 4/5] mirror: fix throttling delay calculation Stefan Hajnoczi
2014-03-25 14:51 ` [Qemu-devel] [PULL for-2.0 5/5] mirror: fix early wake from sleep due to aio Stefan Hajnoczi
2014-03-25 15:24 ` [Qemu-devel] [PULL for-2.0 0/5] Block patches Stefan Hajnoczi
2014-03-25 15:50 ` Peter Maydell
-- strict thread matches above, loose matches on Subject: below --
2014-03-25 14:49 Stefan Hajnoczi
2014-03-25 14:49 ` [Qemu-devel] [PULL for-2.0 2/5] qemu-img: mandate argument to 'qemu-img check --repair' Stefan Hajnoczi
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=1395759095-11276-3-git-send-email-stefanha@redhat.com \
--to=stefanha@redhat.com \
--cc=aliguori@amazon.com \
--cc=peter.maydell@linaro.org \
--cc=prasadjoshi.linux@gmail.com \
--cc=qemu-devel@nongnu.org \
/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).