From: Eric Blake <eblake@redhat.com>
To: "Denis V. Lunev" <den@openvz.org>,
Stefan Hajnoczi <stefanha@redhat.com>,
qemu-devel@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>,
Peter Maydell <peter.maydell@linaro.org>,
Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [Qemu-devel] [PULL 6/8] qemu-img: move common options parsing before commands processing
Date: Fri, 1 Jul 2016 10:39:49 -0600 [thread overview]
Message-ID: <57769CD5.7060008@redhat.com> (raw)
In-Reply-To: <57738543.3030006@openvz.org>
[-- Attachment #1: Type: text/plain, Size: 1262 bytes --]
On 06/29/2016 02:22 AM, Denis V. Lunev wrote:
> On 06/29/2016 12:27 AM, Stefan Hajnoczi wrote:
>> From: "Denis V. Lunev" <den@openvz.org>
>>
>> This is necessary to enable creation of common qemu-img options which
>> will
>> be specified before command.
>> + cmdname = argv[optind];
>> +
>> + /* reset getopt_long scanning */
>> + argc -= optind;
>> + if (argc < 1) {
>> + return 0;
>> + }
>> + argv += optind;
>> + optind = 1;
> this patch breaks check-block.sh
> we should have here
> 'optind = 0'
Uggh. You've landed in one of the portability traps of getopt(). On
glibc, you can reset option parsing by assigning optind to 1 (but it
also works by assigning it to 0); on BSD, you instead set the variable
'optreset'; on Solaris, there is no way to reset option parsing (but
then again, Solaris doesn't maintain any invisible state like glibc or
BSD where you need to go out of your way to do a full reset).
But regardless of how you look at it, the patch has now been committed
to master without your suggested fix, so you'll have to propose a formal
followup patch as a new thread.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]
next prev parent reply other threads:[~2016-07-01 16:39 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-28 21:27 [Qemu-devel] [PULL 0/8] Tracing patches Stefan Hajnoczi
2016-06-28 21:27 ` [Qemu-devel] [PULL 1/8] doc: sync help description for --trace with man for qemu.1 Stefan Hajnoczi
2016-06-28 21:27 ` [Qemu-devel] [PULL 2/8] doc: move text describing --trace to specific .texi file Stefan Hajnoczi
2016-06-28 21:27 ` [Qemu-devel] [PULL 3/8] trace: move qemu_trace_opts to trace/control.c Stefan Hajnoczi
2016-06-28 21:27 ` [Qemu-devel] [PULL 4/8] trace: enable tracing in qemu-io Stefan Hajnoczi
2016-06-28 21:27 ` [Qemu-devel] [PULL 5/8] trace: enable tracing in qemu-nbd Stefan Hajnoczi
2016-06-28 21:27 ` [Qemu-devel] [PULL 6/8] qemu-img: move common options parsing before commands processing Stefan Hajnoczi
2016-06-29 8:22 ` Denis V. Lunev
2016-07-01 16:39 ` Eric Blake [this message]
2016-06-28 21:27 ` [Qemu-devel] [PULL 7/8] trace: enable tracing in qemu-img Stefan Hajnoczi
2016-06-28 21:27 ` [Qemu-devel] [PULL 8/8] trace: [*-user] Add events to trace guest syscalls in syscall emulation mode Stefan Hajnoczi
2016-06-29 15:08 ` [Qemu-devel] [PULL 0/8] Tracing patches Peter Maydell
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=57769CD5.7060008@redhat.com \
--to=eblake@redhat.com \
--cc=den@openvz.org \
--cc=kwolf@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@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.