All of lore.kernel.org
 help / color / mirror / Atom feed
From: Markus Armbruster <armbru@redhat.com>
To: Ryan Harper <ryanh@us.ibm.com>
Cc: john cooper <john.cooper@redhat.com>,
	Michael Tokarev <mjt@tls.msk.ru>,
	qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] virtio-blk: assign a default serial number if	none provided
Date: Wed, 02 Jun 2010 14:32:39 +0200	[thread overview]
Message-ID: <m3pr0962e0.fsf@blackfin.pond.sub.org> (raw)
In-Reply-To: <20100602114234.GA19185@us.ibm.com> (Ryan Harper's message of "Wed, 2 Jun 2010 06:42:34 -0500")

Ryan Harper <ryanh@us.ibm.com> writes:

> * Michael Tokarev <mjt@tls.msk.ru> [2010-06-02 01:57]:
>> 02.06.2010 05:48, Ryan Harper wrote:
>> []
>> >  hw/virtio-blk.c |    3 +++
>> >+    if (strlen(s->sn) == 0) {
>> 
>> Just out of curiocity (not that it is wrong or inefficient):
>> why
>>   strlen(s->sn)
>> and not, say,
>>   !s->sn[0]
>> ?
>
> Just matching how it's done in hw/ide/core.c:ide_init_drive()

I cleaned it up there the other day.

[PATCH 11/14] ide: Turn drive serial into a qdev property ide-drive.serial
http://thread.gmane.org/gmane.comp.emulators.qemu/72441/focus=72432
http://repo.or.cz/w/qemu/kevin.git/commit/ebf5f0ff455a794faca404e62e5dd6d5bdf2fb9b

  reply	other threads:[~2010-06-02 12:32 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-02  1:48 [Qemu-devel] [PATCH] virtio-blk: assign a default serial number if none provided Ryan Harper
2010-06-02  6:56 ` Michael Tokarev
2010-06-02 11:42   ` Ryan Harper
2010-06-02 12:32     ` Markus Armbruster [this message]
2010-06-02  9:00 ` [Qemu-devel] " Michael S. Tsirkin
2010-06-02 11:45   ` Ryan Harper
2010-06-02 11:54     ` Michael S. Tsirkin
2010-06-02 12:26       ` Ryan Harper

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=m3pr0962e0.fsf@blackfin.pond.sub.org \
    --to=armbru@redhat.com \
    --cc=john.cooper@redhat.com \
    --cc=mjt@tls.msk.ru \
    --cc=qemu-devel@nongnu.org \
    --cc=ryanh@us.ibm.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.