Ronnie Sahlberg 135b908878 iscsi: Set number of blocks to 0 for blank CDROM devices
The number of blocks of the device is used to compute the device size
in bdrv_getlength()/iscsi_getlength().
For MMC devices, the ReturnedLogicalBlockAddress in the READCAPACITY10
has a special meaning when it is 0.
In this case it does not mean that LBA 0 is the last accessible LBA,
and thus the device has 1 readable block, but instead it means that the
disc is blank and there are no readable blocks.

This change ensures that when the iSCSI LUN is loaded with a blank
DVD-R disk or similar that bdrv_getlength() will return the correct
size of the device as 0 bytes.

Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2012-08-28 14:50:08 +02:00
2012-08-19 13:39:31 +00:00
2012-08-20 11:05:08 -03:00
2012-08-15 19:43:16 +02:00
2012-08-14 19:01:26 +00:00
2012-08-15 15:18:54 +01:00
2012-08-16 13:41:16 -05:00
2012-08-21 15:16:29 -05:00
2012-08-16 13:41:16 -05:00
2012-08-16 13:41:16 -05:00
2012-08-16 13:41:15 -05:00
2012-08-16 13:41:15 -05:00
2012-08-22 15:45:05 -05:00

Read the documentation in qemu-doc.html or on http://wiki.qemu.org

- QEMU team
Description
No description provided
Readme 404 MiB
Languages
C 82.6%
C++ 6.5%
Python 3.4%
Dylan 2.9%
Shell 1.6%
Other 2.8%