Patchwork [2/6] Respect return value from nbd_client()

login
register
mail settings
Submitter Jes Sorensen
Date Aug. 31, 2010, 7:30 a.m.
Message ID <1283239838-20349-3-git-send-email-Jes.Sorensen@redhat.com>
Download mbox | patch
Permalink /patch/63203/
State New
Headers show

Comments

Jes Sorensen - Aug. 31, 2010, 7:30 a.m.
From: Jes Sorensen <Jes.Sorensen@redhat.com>

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
---
 qemu-nbd.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

Patch

diff --git a/qemu-nbd.c b/qemu-nbd.c
index 9cc8f47..67ce50b 100644
--- a/qemu-nbd.c
+++ b/qemu-nbd.c
@@ -417,7 +417,10 @@  int main(int argc, char **argv)
 
             show_parts(device);
 
-            nbd_client(fd);
+            ret = nbd_client(fd);
+            if (ret) {
+                ret = 1;
+            }
             close(fd);
  out:
             kill(pid, SIGTERM);