|
| From: | Markus Armbruster |
| Subject: | Re: [Qemu-devel] [PATCH] virtio-blk: assign a default serial number if none provided |
| Date: | Wed, 02 Jun 2010 14:32:39 +0200 |
| User-agent: | Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) |
Ryan Harper <address@hidden> writes:
> * Michael Tokarev <address@hidden> [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
| [Prev in Thread] | Current Thread | [Next in Thread] |