ide/atapi: Introduce CHECK_READY flag for commands
commit7a2c4b82340d621bff462672b29c88d2020d68c1
authorKevin Wolf <kwolf@redhat.com>
Tue, 19 Apr 2011 11:15:52 +0000 (19 13:15 +0200)
committerKevin Wolf <kwolf@redhat.com>
Wed, 27 Apr 2011 14:21:00 +0000 (27 16:21 +0200)
tree427ce8ec7b31324bc85f03e2f65063a2e1084ca6
parente119bcaceb8dc17fe4874d6b0d2b62752639e488
ide/atapi: Introduce CHECK_READY flag for commands

Some commands are supposed to report a Not Ready Condition (i.e. they require
a medium to be present in order to execute successfully). Instead of
duplicating the check in each command implementation, let's add a flag and
check it before calling the command.

This patch only converts existing checks, it does not introduce new checks for
any of the other commands that can/should report a Not Ready Condition.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
hw/ide/atapi.c