]> xenbits.xensource.com Git - people/dstodden/blktap.git/commitdiff
control: Fix tap_ctl_create rv after failing tap_ctl_spawn.
authorDaniel Stodden <daniel.stodden@citrix.com>
Tue, 28 Jun 2011 01:08:57 +0000 (18:08 -0700)
committerDaniel Stodden <daniel.stodden@citrix.com>
Tue, 28 Jun 2011 01:08:57 +0000 (18:08 -0700)
This typically applies on broken installations. Borked dev builds,
systems missing a feature or library, or missing a tapdisk2 binary
altogether.

Signed-off-by: Daniel Stodden <daniel.stodden@citrix.com>
control/tap-ctl-create.c

index 1d445a78108dd53ea3d32253d20b72ce81b2e9dd..9508bd9037f5438d5a5128a5d11d4d759389106b 100644 (file)
@@ -45,8 +45,10 @@ tap_ctl_create(const char *params, char **devname, int flags, int parent_minor,
                return err;
 
        id = tap_ctl_spawn();
-       if (id < 0)
+       if (id < 0) {
+               err = id;
                goto destroy;
+       }
 
        err = tap_ctl_attach(id, minor);
        if (err)