mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
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>
This commit is contained in:
parent
822e1cd17e
commit
49aa46bb4b
1 changed files with 1 additions and 1 deletions
2
block.c
2
block.c
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue