libxl: propagate error from tap_ctl_spawn.
authorIan Campbell <ian.campbell@citrix.com>
Mon, 28 Nov 2011 17:42:40 +0000 (17:42 +0000)
committerIan Campbell <ian.campbell@citrix.com>
Mon, 28 Nov 2011 17:42:40 +0000 (17:42 +0000)
Failure here means that a disk will not be correctly setup. I briefly
scanned tools/blktap2/control.c for other goto constructs which did not
set their err variable but didn't see any others.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
tools/blktap2/control/tap-ctl-create.c

index 46d135e93cb925f9b49cd8bd3ac4b61d62c893eb..f4c47f1f7dbb29d132381354d1130ff8609e5a26 100644 (file)
@@ -44,8 +44,10 @@ tap_ctl_create(const char *params, char **devname)
                return err;
 
        id = tap_ctl_spawn();
-       if (id < 0)
+       if (id < 0) {
+               err = id;
                goto destroy;
+       }
 
        err = tap_ctl_attach(id, minor);
        if (err)