qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-block] [PATCH v2 2/2] nbd/client: fix error messages in nbd_ha


From: Eric Blake
Subject: Re: [Qemu-block] [PATCH v2 2/2] nbd/client: fix error messages in nbd_handle_reply_err
Date: Thu, 1 Mar 2018 12:25:08 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0

On 03/01/2018 06:10 AM, Vladimir Sementsov-Ogievskiy wrote:
26.02.2018 19:57, Eric Blake wrote:
From: Vladimir Sementsov-Ogievskiy <address@hidden>

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 <address@hidden>
Message-Id: <address@hidden>
[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 <address@hidden>

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]