Return proper error codes on failure so that scripts can tell whether the command completed properly or not.
Signed-off-by: George Dunlap <george.dun...@eu.citrix.com> --- CC: Ian Campbell <ian.campb...@citrix.com> CC: Ian Jackson <ian.jack...@citrix.com> CC: Wei Liu <wei.l...@citrix.com> CC: Konrad Wilk <konrad.w...@oracle.com> Release justification: This is a bug fix. It's a fairly minor one, but it's also a very simple one. --- tools/libxl/xl_cmdimpl.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c index 3c9f146..b2abe4f 100644 --- a/tools/libxl/xl_cmdimpl.c +++ b/tools/libxl/xl_cmdimpl.c @@ -6383,6 +6383,7 @@ int main_blockattach(int argc, char **argv) if (libxl_device_disk_add(ctx, fe_domid, &disk, 0)) { fprintf(stderr, "libxl_device_disk_add failed.\n"); + return 1; } return 0; } @@ -6444,6 +6445,7 @@ int main_blockdetach(int argc, char **argv) rc = libxl_device_disk_remove(ctx, domid, &disk, 0); if (rc) { fprintf(stderr, "libxl_device_disk_remove failed.\n"); + return 1; } libxl_device_disk_dispose(&disk); return rc; -- 1.9.1 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel