Revision 2c2a6bb8
b/monitor.c | ||
---|---|---|
748 | 748 |
if (bdrv_is_inserted(bs)) { |
749 | 749 |
if (!force) { |
750 | 750 |
if (!bdrv_is_removable(bs)) { |
751 |
monitor_printf(mon, "device is not removable\n"); |
|
751 |
qemu_error_new(QERR_DEVICE_NOT_REMOVABLE, |
|
752 |
bdrv_get_device_name(bs)); |
|
752 | 753 |
return -1; |
753 | 754 |
} |
754 | 755 |
if (bdrv_is_locked(bs)) { |
755 |
monitor_printf(mon, "device is locked\n");
|
|
756 |
qemu_error_new(QERR_DEVICE_LOCKED, bdrv_get_device_name(bs));
|
|
756 | 757 |
return -1; |
757 | 758 |
} |
758 | 759 |
} |
... | ... | |
769 | 770 |
|
770 | 771 |
bs = bdrv_find(filename); |
771 | 772 |
if (!bs) { |
772 |
monitor_printf(mon, "device not found\n");
|
|
773 |
qemu_error_new(QERR_DEVICE_NOT_FOUND, filename);
|
|
773 | 774 |
return; |
774 | 775 |
} |
775 | 776 |
eject_device(mon, bs, force); |
Also available in: Unified diff