# HG changeset patch
# User Ian Campbell <ian.campbell@xxxxxxxxxx>
# Date 1304499810 -3600
# Node ID 1e3a986b6d298628c6ef8839448860fd41771b2a
# Parent 4d0e906543dc115b5b2f90e0cb44f6affb3f1f99
libxl: check that device model binary is executable.
This causes us to fail more quickly in more obvious failure case of not
having the right binary installed.
Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
diff -r 4d0e906543dc -r 1e3a986b6d29 tools/libxl/libxl_dm.c
--- a/tools/libxl/libxl_dm.c Tue May 03 16:53:22 2011 +0100
+++ b/tools/libxl/libxl_dm.c Wed May 04 10:03:30 2011 +0100
@@ -762,7 +762,12 @@ int libxl__create_device_model(libxl__gc
rc = ERROR_FAIL;
goto out;
}
-
+ if (access(dm, X_OK) < 0) {
+ LIBXL__LOG_ERRNO(ctx, LIBXL__LOG_ERROR,
+ "device model %s is not executable", dm);
+ rc = ERROR_FAIL;
+ goto out;
+ }
args = libxl__build_device_model_args(gc, dm, info, disks, num_disks,
vifs, num_vifs);
if (!args) {
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|