mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-08-27 11:01:19 +00:00
https://bugzilla.redhat.com/show_bug.cgi?id=1566416 Commit id 'fe2af45b' added output for logical_block_size and num_blocks for both removeable and fixed storage, but did not update the nodedev capability causing virt-xml-validate to fail. It's listed as optional only because it only prints if the sizes are > 0. For a CDROM drive the values won't be formatted. Update the nodedevxml2xmltest in order to output the values for storage based on the logic from udevProcessRemoveableMedia and udevProcessSD with respect to the logical_blocksize and num_blocks calculations. Signed-off-by: John Ferlan <jferlan@redhat.com> ACKed-by Michal Privoznik <mprivozn@redhat.com>
19 lines
576 B
XML
19 lines
576 B
XML
<device>
|
|
<name>DVD_GCC_4247N</name>
|
|
<parent>pci_8086_27df_scsi_host_scsi_device_lun0</parent>
|
|
<capability type='storage'>
|
|
<block>/dev/sr0</block>
|
|
<bus>scsi</bus>
|
|
<drive_type>cdrom</drive_type>
|
|
<model>RW/DVD GCC-4247N</model>
|
|
<vendor>HL-DT-ST</vendor>
|
|
<capability type='removable'>
|
|
<media_available>1</media_available>
|
|
<media_size>12345678</media_size>
|
|
<media_label>Windows_XP_Label</media_label>
|
|
<logical_block_size>2048</logical_block_size>
|
|
<num_blocks>6028</num_blocks>
|
|
</capability>
|
|
</capability>
|
|
</device>
|