aboutsummaryrefslogtreecommitdiffstats
path: root/tools/blktap2
diff options
context:
space:
mode:
authorIan Campbell <ian.campbell@citrix.com>2011-11-28 17:42:40 +0000
committerIan Campbell <ian.campbell@citrix.com>2011-11-28 17:42:40 +0000
commitc5950569ef0a7891d2f5e4a28630f42205f7f344 (patch)
tree0c08710b983f1d293f2128b6c3ac1daa3466ed42 /tools/blktap2
parent00bd522de7e836065f4ebee8ccd6fee9757960a8 (diff)
downloadxen-c5950569ef0a7891d2f5e4a28630f42205f7f344.tar.gz
xen-c5950569ef0a7891d2f5e4a28630f42205f7f344.tar.bz2
xen-c5950569ef0a7891d2f5e4a28630f42205f7f344.zip
libxl: propagate error from tap_ctl_spawn.
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>
Diffstat (limited to 'tools/blktap2')
-rw-r--r--tools/blktap2/control/tap-ctl-create.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/blktap2/control/tap-ctl-create.c b/tools/blktap2/control/tap-ctl-create.c
index 46d135e93c..f4c47f1f7d 100644
--- a/tools/blktap2/control/tap-ctl-create.c
+++ b/tools/blktap2/control/tap-ctl-create.c
@@ -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)