cdrom: use TEST UNIT READY to detect ready medium
authorPaolo Bonzini <pbonzini@redhat.com>
Wed, 16 Nov 2011 12:02:42 +0000 (13:02 +0100)
committerKevin O'Connor <kevin@koconnor.net>
Fri, 18 Nov 2011 02:01:31 +0000 (21:01 -0500)
commit0082374caae8b8f0e235034d3ee2faaa48274d42
tree565ad14aaba4990f6b49fc62c16a973b0edfd6f0
parent7f7b0f6cbd716f18494d26045e42dd7a3c26dfb0
cdrom: use TEST UNIT READY to detect ready medium

The READ CAPACITY output is not used except for some debugging messages.
In the future, we will use this code for USB sticks too, but those
already send READ CAPACITY.  To avoid code duplication, switch to TEST
UNIT READY for this task.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
src/blockcmd.c
src/blockcmd.h
src/cdrom.c