Revision a3a55a2e monitor.c
b/monitor.c | ||
---|---|---|
772 | 772 |
eject_device(mon, bs, force); |
773 | 773 |
} |
774 | 774 |
|
775 |
static void do_block_set_passwd(Monitor *mon, const QDict *qdict, |
|
776 |
QObject **ret_data) |
|
777 |
{ |
|
778 |
BlockDriverState *bs; |
|
779 |
|
|
780 |
bs = bdrv_find(qdict_get_str(qdict, "device")); |
|
781 |
if (!bs) { |
|
782 |
qemu_error_new(QERR_DEVICE_NOT_FOUND, qdict_get_str(qdict, "device")); |
|
783 |
return; |
|
784 |
} |
|
785 |
|
|
786 |
if (bdrv_set_key(bs, qdict_get_str(qdict, "password")) < 0) { |
|
787 |
qemu_error_new(QERR_INVALID_PASSWORD); |
|
788 |
} |
|
789 |
} |
|
790 |
|
|
775 | 791 |
static void do_change_block(Monitor *mon, const char *device, |
776 | 792 |
const char *filename, const char *fmt) |
777 | 793 |
{ |
Also available in: Unified diff