All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wenchao Xia <xiawenc@linux.vnet.ibm.com>
To: Stefan Hajnoczi <stefanha@gmail.com>
Cc: kwolf@redhat.com, phrdina@redhat.com, famz@redhat.com,
	qemu-devel@nongnu.org, armbru@redhat.com, lcapitulino@redhat.com,
	stefanha@redhat.com, pbonzini@redhat.com, dietmar@proxmox.com
Subject: Re: [Qemu-devel] [PATCH V5 2/8] snapshot: distinguish id and name in snapshot delete
Date: Fri, 19 Jul 2013 17:12:27 +0800	[thread overview]
Message-ID: <51E902FB.3040203@linux.vnet.ibm.com> (raw)
In-Reply-To: <20130718110704.GC9328@stefanha-thinkpad.redhat.com>

于 2013-7-18 19:07, Stefan Hajnoczi 写道:
> On Thu, Jul 11, 2013 at 01:46:58PM +0800, Wenchao Xia wrote:
>> diff --git a/include/qemu-common.h b/include/qemu-common.h
>> index f439738..06c777f 100644
>> --- a/include/qemu-common.h
>> +++ b/include/qemu-common.h
>> @@ -191,6 +191,9 @@ int64_t strtosz_suffix(const char *nptr, char **end, const char default_suffix);
>>   int64_t strtosz_suffix_unit(const char *nptr, char **end,
>>                               const char default_suffix, int64_t unit);
>>
>> +/* used to print char* safely */
>> +#define STR_PRINT_CHAR(str) ((str) ? (str) : "null")
>
> When I saw the name I thought it would filter out non-printable
> characters.  Maybe STR_OR_NULL() is a better name?
>
   I'll use STR_OR_NULL(), looks better.

> BTW the evil gcc shortcut is pretty quick to type: str ?: "null".
>
> Besides this I'm pretty happy with this version.
>


-- 
Best Regards

Wenchao Xia

  reply	other threads:[~2013-07-19  9:12 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-11  5:46 [Qemu-devel] [PATCH V5 0/8] add internal snapshot support at block device level Wenchao Xia
2013-07-11  5:46 ` [Qemu-devel] [PATCH V5 1/8] snapshot: new function bdrv_snapshot_find_by_id_and_name() Wenchao Xia
2013-07-11  5:46 ` [Qemu-devel] [PATCH V5 2/8] snapshot: distinguish id and name in snapshot delete Wenchao Xia
2013-07-18 11:07   ` Stefan Hajnoczi
2013-07-19  9:12     ` Wenchao Xia [this message]
2013-07-18 11:48   ` Kevin Wolf
2013-07-19  9:13     ` Wenchao Xia
2013-07-11  5:46 ` [Qemu-devel] [PATCH V5 3/8] qmp: add internal snapshot support in qmp_transaction Wenchao Xia
2013-07-18 12:22   ` Kevin Wolf
2013-07-19  9:19     ` Wenchao Xia
2013-07-19 10:13       ` Kevin Wolf
2013-07-20  0:09         ` Wenchao Xia
2013-07-11  5:47 ` [Qemu-devel] [PATCH V5 4/8] qmp: add interface blockdev-snapshot-internal-sync Wenchao Xia
2013-07-11  5:47 ` [Qemu-devel] [PATCH V5 5/8] qmp: add interface blockdev-snapshot-delete-internal-sync Wenchao Xia
2013-07-11  5:47 ` [Qemu-devel] [PATCH V5 6/8] hmp: add interface hmp_snapshot_blkdev_internal Wenchao Xia
2013-07-11  5:47 ` [Qemu-devel] [PATCH V5 7/8] hmp: add interface hmp_snapshot_delete_blkdev_internal Wenchao Xia
2013-07-11  5:47 ` [Qemu-devel] [PATCH V5 8/8] qemu-iotests: add 056 internal snapshot for block device test case Wenchao Xia
2013-07-18 11:09 ` [Qemu-devel] [PATCH V5 0/8] add internal snapshot support at block device level Stefan Hajnoczi
2013-07-18 12:34 ` Kevin Wolf
2013-07-19  5:32   ` 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=51E902FB.3040203@linux.vnet.ibm.com \
    --to=xiawenc@linux.vnet.ibm.com \
    --cc=armbru@redhat.com \
    --cc=dietmar@proxmox.com \
    --cc=famz@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=lcapitulino@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=phrdina@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@gmail.com \
    --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.