On 03/01/2018 06:10 AM, Vladimir Sementsov-Ogievskiy wrote:
26.02.2018 19:57, Eric Blake wrote:
From: Vladimir Sementsov-Ogievskiy <vsement...@virtuozzo.com>
1. NBD_REP_ERR_INVALID is not only about length, so, make message more
general
2. hex format is not very good: it's hard to read something like
"option a (set meta context)", so switch to dec.
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsement...@virtuozzo.com>
Message-Id: <1518702707-7077-6-git-send-email-vsement...@virtuozzo.com>
[eblake: expand scope of patch: ALL uses of nbd_opt_lookup are now
decimal, all uses of nbd_rep_lookup are prefixed hex]
Signed-off-by: Eric Blake <ebl...@redhat.com>
one thought: isn't it better to have all NBD constants in dec, like in
spec?
Sure, I can make that change.
@@ -378,8 +378,8 @@ static int nbd_opt_go(QIOChannel *ioc, const char
*wantname,
return 1;
}
if (reply.type != NBD_REP_INFO) {
- error_setg(errp, "unexpected reply type %" PRIx32
- " (%s), expected %x",
+ error_setg(errp, "unexpected reply type 0x%" PRIx32
+ " (%s), expected 0x%x",
reply.type, nbd_rep_lookup(reply.type),
NBD_REP_INFO);
That is, I'll respin with this and other nbd_rep_lookup()s using decimal
output.
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org