qemu-img: add special exit code if bdrv_check is not supported
PATCH v2 1/1 qemu-img: add special exit code if bdrv_check is not supported
currently it is not possible to distinguish by exitcode if there has been an error or if bdrv_check is not supported by the image format. Change the exitcode from 1 to 63 for the latter case.
---v1->v2: As Eric suggested changed the exitcode from 255 to 63.
qemu-img.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
qemu-img.c +1 -1
@@ -607,7 +607,7 @@ static int img_check(int argc, char **argv)if (output_format ==OFORMAT_HUMAN ) {error_report ("This image format does not support checks" ); } - ret =1 ; + ret =63 ; goto fail; }
Signature · 1 line
1.7.9.5
Quoted 10 lines · Peter Lieven
currently it is not possible to distinguish by exitcode if there has been an error or if
bdrv_checkis not supported by the image format. Change the exitcode from 1 to 63 for the latter case.Signed-off-by Peter Lieven <[email protected]>---
v1->v2: As Eric suggested changed the exitcode from 255 to 63.qemu-img.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Should the man page document this exit status? Then again, it doesn't document ANY exit status, so that could be a separate patch.
Quoted 15 lines
qemu-img.c +1
-1@@ -607,7 +607,7 @@ static int img_check(int argc, char **argv)if (output_format ==OFORMAT_HUMAN ) {error_report ("This image format does not support checks" ); } - ret =1 ; + ret =63 ; goto fail; }
Signature · 2 lines
Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
Kevin Wolf
AppliedAm 24.10.2013 um 09:00 hat Eric Blake geschrieben:
Quoted 9 lines · Peter Lieven
Quoted 8 lines
currently it is not possible to distinguish by exitcode if there has been an error or if
bdrv_checkis not supported by the image format. Change the exitcode from 1 to 63 for the latter case.Signed-off-by Peter Lieven <[email protected]>---
v1->v2: As Eric suggested changed the exitcode from 255 to 63.
Quoted 7 lines
Quoted 2 lines
qemu-img.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)Should the man page document this exit status? Then again, it doesn't document ANY exit status, so that could be a separate patch.
Reviewed-by Eric Blake <[email protected]>
Thanks, applied to the block branch.
Kevin