Re: [PATCH 2/4] conf: Parse and format disk <wwn>

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Il 30/08/2012 18:14, Paolo Bonzini ha scritto:
>> @@ -11557,6 +11564,7 @@ virDomainDiskDefFormat(virBufferPtr buf,
>> >      if (def->transient)
>> >          virBufferAddLit(buf, "      <transient/>\n");
>> >      virBufferEscapeString(buf, "      <serial>%s</serial>\n", def->serial);
>> > +    virBufferEscapeString(buf, "      <wwn>%s</wwn>\n", def->wwn);
> What happens if the wwn was not passed?
> 
> If it is NULL, it's a bug (same for serial).
> 
> If it is empty, the output will not obey the schema, so the whole
> element should be left out.  I think it's best to do the same for
> serial, but technically it should be ok.

Also, should libvirt validate the format of the WWN?

Paolo

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]