qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Leandro Dorileo <l@dorileo.org>
To: Prasad Joshi <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: Re: [Qemu-devel] [PATCH] qemu-img: mandate argument to 'qemu-img check --repair'
Date: Mon, 24 Mar 2014 18:57:11 +0000	[thread overview]
Message-ID: <20140324185711.GA1563@dorilex> (raw)
In-Reply-To: <1395686334-9498-1-git-send-email-prasadjoshi.linux@gmail.com>

On Tue, Mar 25, 2014 at 12:08:54AM +0530, Prasad Joshi wrote:
> 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>


Patch looks good to me.

Reviewed-by: Leandro Dorileo <l@dorileo.org>


> ---
>  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
> 
> 

-- 
Leandro Dorileo

  reply	other threads:[~2014-03-24 18:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-24 18:38 [Qemu-devel] [PATCH] qemu-img: mandate argument to 'qemu-img check --repair' Prasad Joshi
2014-03-24 18:57 ` Leandro Dorileo [this message]
2014-03-25 11:07 ` [Qemu-devel] [PATCH for-2.0] " Kevin Wolf
2014-03-25 12:41 ` [Qemu-devel] [PATCH] " 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=20140324185711.GA1563@dorilex \
    --to=l@dorileo.org \
    --cc=kwolf@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=pl@kamp.de \
    --cc=prasadjoshi.linux@gmail.com \
    --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 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).