diff options
Diffstat (limited to 'blockdev-nbd.c')
-rw-r--r-- | blockdev-nbd.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/blockdev-nbd.c b/blockdev-nbd.c index 0d9df47ce4..bcdd18b3f6 100644 --- a/blockdev-nbd.c +++ b/blockdev-nbd.c @@ -12,7 +12,6 @@ #include "sysemu/blockdev.h" #include "sysemu/block-backend.h" #include "hw/block/block.h" -#include "monitor/monitor.h" #include "qapi/qmp/qerror.h" #include "sysemu/sysemu.h" #include "qmp-commands.h" @@ -91,11 +90,12 @@ void qmp_nbd_server_add(const char *device, bool has_writable, bool writable, blk = blk_by_name(device); if (!blk) { - error_set(errp, QERR_DEVICE_NOT_FOUND, device); + error_set(errp, ERROR_CLASS_DEVICE_NOT_FOUND, + "Device '%s' not found", device); return; } if (!blk_is_inserted(blk)) { - error_set(errp, QERR_DEVICE_HAS_NO_MEDIUM, device); + error_setg(errp, QERR_DEVICE_HAS_NO_MEDIUM, device); return; } |