qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 3/3] qemu-nbd: Improve error reporting


From: Anthony Liguori
Subject: Re: [Qemu-devel] [PATCH 3/3] qemu-nbd: Improve error reporting
Date: Mon, 03 May 2010 12:01:02 -0500
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.5) Gecko/20091209 Fedora/3.0-4.fc12 Lightning/1.0pre Thunderbird/3.0

On 03/29/2010 06:03 AM, Kevin Wolf wrote:
Am 28.03.2010 19:07, schrieb Ryota Ozaki:
- use err(3) instead of errx(3) if errno is available
   to report why failed
- let fail prior to daemon(3) if opening a nbd file
   is likely to fail after daemonizing to avoid silent
   failure exit
- add missing 'ret = 1' when unix_socket_outgoing failed

Signed-off-by: Ryota Ozaki<address@hidden>
Acked-by: Kevin Wolf<address@hidden>

Are you going to pull this into the block branch?

Regards,

Anthony Liguori

@@ -343,25 +343,31 @@ int main(int argc, char **argv)
          return 1;
      }

-    if (bdrv_open(bs, argv[optind], flags)<  0) {
-        return 1;
+    if ((ret = bdrv_open(bs, argv[optind], flags))<  0) {
+        errno = -ret;
+        err(EXIT_FAILURE, "Failed to bdrv_open '%s'", argv[optind]);
      }
If you do it like this, you could do the change for even more errors,
like the ones returned by bdrv_read. But that doesn't make this patch
less correct, of course.

Kevin








reply via email to

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