Ryan Harper writes:
> * Michael Tokarev [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
* Michael Tokarev [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 do
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]
?
/mjt
This patch applies on-top of John's virtio-blk serial patches.
Generate default serial numbers for virtio drives based on DriveInfo.unit which
is
incremented for each additional virtio-blk device. This provides a
per-virtio-blk number to use in the default string: QM%05d that is used in
hw/ide/c