summaryrefslogtreecommitdiff
path: root/blockdev.c
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2011-09-06 18:58:46 +0200
committerKevin Wolf <kwolf@redhat.com>2011-09-12 15:17:20 +0200
commitf107639a6ff0c8d02f6a2dfdfce3a9d9f1e2eb27 (patch)
tree0c5368f533034b7e1adbd02be5dcff6367cf3a94 /blockdev.c
parentfdec4404ddfaf9e121bef84eac1303a8a0e47d75 (diff)
block: Drop medium lock tracking, ask device models instead
Requires new BlockDevOps member is_medium_locked(). Implement for IDE and SCSI CD-ROMs. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'blockdev.c')
-rw-r--r--blockdev.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/blockdev.c b/blockdev.c
index 049dda5549..3f00b2e61b 100644
--- a/blockdev.c
+++ b/blockdev.c
@@ -640,7 +640,7 @@ static int eject_device(Monitor *mon, BlockDriverState *bs, int force)
qerror_report(QERR_DEVICE_NOT_REMOVABLE, bdrv_get_device_name(bs));
return -1;
}
- if (!force && bdrv_is_locked(bs)) {
+ if (!force && bdrv_dev_is_medium_locked(bs)) {
qerror_report(QERR_DEVICE_LOCKED, bdrv_get_device_name(bs));
return -1;
}