[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] xl: Return proper error codes for block-attach and block-detach
commit 47c6e7f28ddc27f194c7c4902ea3163ba582b582 Author: George Dunlap <george.dunlap@xxxxxxxxxxxxx> AuthorDate: Wed Nov 12 17:31:33 2014 +0000 Commit: Ian Campbell <ian.campbell@xxxxxxxxxx> CommitDate: Tue Nov 25 14:04:04 2014 +0000 xl: Return proper error codes for block-attach and block-detach Return proper error codes on failure so that scripts can tell whether the command completed properly or not. This is not a proper fix, since it fails to call libxl_device_disk_dispose() on the error path. But a proper fix requires some refactoring, so given where we are in the release process, it's better to have a fix that is simple and obvious, and do the refactoring once the next development window opens up. Signed-off-by: George Dunlap <george.dunlap@xxxxxxxxxxxxx> Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx> --- tools/libxl/xl_cmdimpl.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c index 9afef3f..0e754e7 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; -- generated by git-patchbot for /home/xen/git/xen.git#master _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |