From: Prasad Joshi <prasadjoshi.linux@gmail.com>
To: prasadjoshi.linux@gmail.com
Cc: kwolf@redhat.com, qemu-trivial@nongnu.org, pl@kamp.de,
qemu-devel@nongnu.org, stefanha@redhat.com, pbonzini@redhat.com,
eblake@redhat.com
Subject: [Qemu-trivial] [PATCH] qemu-img: mandate argument to 'qemu-img check --repair'
Date: Tue, 25 Mar 2014 00:08:54 +0530 [thread overview]
Message-ID: <1395686334-9498-1-git-send-email-prasadjoshi.linux@gmail.com> (raw)
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>
---
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.1.2
WARNING: multiple messages have this Message-ID (diff)
From: Prasad Joshi <prasadjoshi.linux@gmail.com>
To: prasadjoshi.linux@gmail.com
Cc: kwolf@redhat.com, qemu-trivial@nongnu.org, pl@kamp.de,
qemu-devel@nongnu.org, stefanha@redhat.com, pbonzini@redhat.com
Subject: [Qemu-devel] [PATCH] qemu-img: mandate argument to 'qemu-img check --repair'
Date: Tue, 25 Mar 2014 00:08:54 +0530 [thread overview]
Message-ID: <1395686334-9498-1-git-send-email-prasadjoshi.linux@gmail.com> (raw)
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>
---
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.1.2
next reply other threads:[~2014-03-24 18:39 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-24 18:38 Prasad Joshi [this message]
2014-03-24 18:38 ` [Qemu-devel] [PATCH] qemu-img: mandate argument to 'qemu-img check --repair' Prasad Joshi
2014-03-24 18:57 ` [Qemu-trivial] " Leandro Dorileo
2014-03-24 18:57 ` Leandro Dorileo
2014-03-25 11:07 ` [Qemu-trivial] [PATCH for-2.0] " Kevin Wolf
2014-03-25 11:07 ` [Qemu-devel] " Kevin Wolf
2014-03-25 12:41 ` [Qemu-trivial] [Qemu-devel] [PATCH] " Stefan Hajnoczi
2014-03-25 12:41 ` 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=1395686334-9498-1-git-send-email-prasadjoshi.linux@gmail.com \
--to=prasadjoshi.linux@gmail.com \
--cc=eblake@redhat.com \
--cc=kwolf@redhat.com \
--cc=pbonzini@redhat.com \
--cc=pl@kamp.de \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@nongnu.org \
--cc=stefanha@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.