diff options
author | Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> | 2018-01-19 16:57:15 +0300 |
---|---|---|
committer | Eric Blake <eblake@redhat.com> | 2018-01-26 09:37:20 -0600 |
commit | 902a1f94bee2f5c633bb623baf2160c0a6da097c (patch) | |
tree | 172642330cb8ede5ad843ee82de7cc2179e5f754 /hmp.c | |
parent | e607bbee553cfe73072870cef458cfa4e78133e2 (diff) | |
download | qemu-902a1f94bee2f5c633bb623baf2160c0a6da097c.zip qemu-902a1f94bee2f5c633bb623baf2160c0a6da097c.tar.gz qemu-902a1f94bee2f5c633bb623baf2160c0a6da097c.tar.bz2 |
qapi: add name parameter to nbd-server-add
Allow user to specify name for new export, to not reuse internal
node name and to not show it to clients.
This also allows creating several exports per device.
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <20180119135719.24745-2-vsementsov@virtuozzo.com>
Signed-off-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'hmp.c')
-rw-r--r-- | hmp.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -2203,7 +2203,8 @@ void hmp_nbd_server_start(Monitor *mon, const QDict *qdict) continue; } - qmp_nbd_server_add(info->value->device, true, writable, &local_err); + qmp_nbd_server_add(info->value->device, false, NULL, + true, writable, &local_err); if (local_err != NULL) { qmp_nbd_server_stop(NULL); @@ -2223,7 +2224,7 @@ void hmp_nbd_server_add(Monitor *mon, const QDict *qdict) bool writable = qdict_get_try_bool(qdict, "writable", false); Error *local_err = NULL; - qmp_nbd_server_add(device, true, writable, &local_err); + qmp_nbd_server_add(device, false, NULL, true, writable, &local_err); if (local_err != NULL) { hmp_handle_error(mon, &local_err); |