qemu-block
[Top][All Lists]
Advanced

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

Re: [PATCH v4 29/31] nbd: Fix error_append_hint/error_prepend usage


From: Eric Blake
Subject: Re: [PATCH v4 29/31] nbd: Fix error_append_hint/error_prepend usage
Date: Tue, 1 Oct 2019 12:47:19 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.1.0

On 10/1/19 10:53 AM, Vladimir Sementsov-Ogievskiy wrote:
If we want to add some info to errp (by error_prepend() or
error_append_hint()), we must use the ERRP_AUTO_PROPAGATE macro.
Otherwise, this info will not be added when errp == &fatal_err
(the program will exit prior to the error_append_hint() or
error_prepend() call).  Fix such cases.


---
  nbd/client.c | 5 +++++
  nbd/server.c | 4 ++++
  2 files changed, 9 insertions(+)


+++ b/nbd/server.c
@@ -365,6 +365,7 @@ static int nbd_opt_read_name(NBDClient *client, char *name, 
uint32_t *length,
  static int nbd_negotiate_send_rep_list(NBDClient *client, NBDExport *exp,
                                         Error **errp)
  {
+    ERRP_AUTO_PROPAGATE();
      size_t name_len, desc_len;

This missed nbd_negotiate_send_rep_verr(). But when I reran the script manually on the same two files, it picked up for me. Not sure why that is different.

--
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org



reply via email to

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