diff options
author | Markus Armbruster <armbru@redhat.com> | 2011-07-20 18:23:43 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2011-08-01 12:10:28 +0200 |
commit | 49aa46bb4b894ff8bdb0339ee2a5dd3fcfe93ecd (patch) | |
tree | bf66b985e9fbe0c270861fbfd5d7601235a5095c /block.c | |
parent | 822e1cd17e8fa3ae98d0481c20f042316ace3fbc (diff) | |
download | qemu-49aa46bb4b894ff8bdb0339ee2a5dd3fcfe93ecd.tar.gz qemu-49aa46bb4b894ff8bdb0339ee2a5dd3fcfe93ecd.tar.bz2 qemu-49aa46bb4b894ff8bdb0339ee2a5dd3fcfe93ecd.zip |
block: Don't let locked flag prevent medium load
Commit aea2a33c made bdrv_eject() obey the locked flag. Correct for
medium eject (eject_flag set), incorrect for medium load (eject_flag
clear). See MMC-5 Table 341 "Actions for Lock/Unlock/Eject".
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'block.c')
-rw-r--r-- | block.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -2771,7 +2771,7 @@ int bdrv_eject(BlockDriverState *bs, int eject_flag) { BlockDriver *drv = bs->drv; - if (bs->locked) { + if (eject_flag && bs->locked) { return -EBUSY; } |