Paolo Bonzini <pbonz...@redhat.com> writes:

> On 29/08/2016 09:52, ronyw...@synology.com wrote:
>> From: ronyweng <ronyw...@synology.com>
>> 
>> Openstack Cinder assigns volume a 36 characters uuid as serial.
>> Qemu will shrinks the uuid to 20 characters,
>> missmatch with original uuid.
>> 
>> Signed-off-by: Rony Weng <ronyw...@synology.com>
>> ---
>>  hw/scsi/scsi-disk.c | 4 ++--
>>  1 file changed, 2 insertions(+), 2 deletions(-)
>> 
>> diff --git a/hw/scsi/scsi-disk.c b/hw/scsi/scsi-disk.c
>> index 836a155..0e1bb68 100644
>> --- a/hw/scsi/scsi-disk.c
>> +++ b/hw/scsi/scsi-disk.c
>> @@ -599,8 +599,8 @@ static int scsi_disk_emulate_inquiry(SCSIRequest *req, 
>> uint8_t *outbuf)
>>              }
>>  
>>              l = strlen(s->serial);
>> -            if (l > 20) {
>> -                l = 20;
>> +            if (l > 36) {
>> +                l = 36;
>>              }
>>  
>>              DPRINTF("Inquiry EVPD[Serial number] "
>> 
>
> Cc: qemu-sta...@nongnu.org
>
> Thanks, queued for 2.8 and 2.7.1
>
> Paolo

Pointing to the applicable SCSI spec chapter & verse in the commit
message would be nice.  As is, 36 looks as arbitrary as 20.

Reply via email to