mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 08:13:54 -06:00
nbd: Add qemu-nbd -D for human-readable description
The NBD protocol allows servers to advertise a human-readable
description alongside an export name during NBD_OPT_LIST. Add
an option to pass through the user's string to the NBD client.
Doing this also makes it easier to test commit 200650d4
, which
is the client counterpart of receiving the description.
Signed-off-by: Eric Blake <eblake@redhat.com>
Message-Id: <1476469998-28592-2-git-send-email-eblake@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
1775f111ea
commit
b1a75b3348
5 changed files with 45 additions and 12 deletions
|
@ -104,9 +104,10 @@ static inline ssize_t read_sync(QIOChannel *ioc, void *buffer, size_t size)
|
|||
return nbd_wr_syncv(ioc, &iov, 1, size, true);
|
||||
}
|
||||
|
||||
static inline ssize_t write_sync(QIOChannel *ioc, void *buffer, size_t size)
|
||||
static inline ssize_t write_sync(QIOChannel *ioc, const void *buffer,
|
||||
size_t size)
|
||||
{
|
||||
struct iovec iov = { .iov_base = buffer, .iov_len = size };
|
||||
struct iovec iov = { .iov_base = (void *) buffer, .iov_len = size };
|
||||
|
||||
return nbd_wr_syncv(ioc, &iov, 1, size, false);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue