From: Eric Blake <eblake@redhat.com>
To: Max Reitz <mreitz@redhat.com>, qemu-devel@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>, Fam Zheng <famz@redhat.com>,
Stefan Hajnoczi <stefanha@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v2 1/2] blkdebug: Simplify and improve filename generation
Date: Mon, 10 Nov 2014 12:15:27 -0700 [thread overview]
Message-ID: <54610ECF.4000301@redhat.com> (raw)
In-Reply-To: <1415638784-32311-2-git-send-email-mreitz@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1282 bytes --]
On 11/10/2014 09:59 AM, Max Reitz wrote:
> Instead of actually recreating the options from scratch, just reuse the
> options given for creating the BDS, which are the configuration file
> name and additional options. In case there are no additional options we
> can thus create a plain filename.
>
> This obviously results in a different output for qemu-iotest 099 which
> exactly tests this filename generation. Fix it up as well.
>
> Signed-off-by: Max Reitz <mreitz@redhat.com>
> ---
> block/blkdebug.c | 98 +++++++++++++---------------------------------
> tests/qemu-iotests/099.out | 4 +-
> 2 files changed, 29 insertions(+), 73 deletions(-)
>
>
> + if (!force_json && bs->file->exact_filename[0]) {
> + snprintf(bs->exact_filename, sizeof(bs->exact_filename),
> + "blkdebug:%s:%s", qdict_get_try_str(bs->options, "config"),
If there is no "config" entry, this can pass NULL as a %s counterpart to
snprintf, which is undefined behavior (works on glibc, but might crash
elsewhere).
Everything else looked okay, but I'm afraid I may have given you reason
to post a v3 and make a kitten cry :(
--
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: 539 bytes --]
next prev parent reply other threads:[~2014-11-10 19:15 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-10 16:59 [Qemu-devel] [PATCH v2 0/2] block: Improve filename generation for blkdebug Max Reitz
2014-11-10 16:59 ` [Qemu-devel] [PATCH v2 1/2] blkdebug: Simplify and improve filename generation Max Reitz
2014-11-10 19:15 ` Eric Blake [this message]
2014-11-11 8:01 ` Max Reitz
2014-11-10 16:59 ` [Qemu-devel] [PATCH v2 2/2] iotests: Plain blkdebug " Max Reitz
2014-11-10 19:17 ` Eric Blake
2014-11-10 17:00 ` [Qemu-devel] [PATCH v2 0/2] block: Improve filename generation for blkdebug Max Reitz
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=54610ECF.4000301@redhat.com \
--to=eblake@redhat.com \
--cc=famz@redhat.com \
--cc=kwolf@redhat.com \
--cc=mreitz@redhat.com \
--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.