From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40351) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VZEur-0005I8-Lt for qemu-devel@nongnu.org; Thu, 24 Oct 2013 03:01:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VZEun-0008ED-8V for qemu-devel@nongnu.org; Thu, 24 Oct 2013 03:01:09 -0400 Received: from mx1.redhat.com ([209.132.183.28]:12275) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VZEun-0008E9-0N for qemu-devel@nongnu.org; Thu, 24 Oct 2013 03:01:05 -0400 Message-ID: <5268C59E.7060103@redhat.com> Date: Thu, 24 Oct 2013 08:00:46 +0100 From: Eric Blake MIME-Version: 1.0 References: <1382597614-8973-1-git-send-email-pl@kamp.de> In-Reply-To: <1382597614-8973-1-git-send-email-pl@kamp.de> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="sevgSjgUE0IleXoAUqmvqcxlIi4xN3ccC" Subject: Re: [Qemu-devel] [PATCHv2] qemu-img: add special exit code if bdrv_check is not supported List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Lieven , qemu-devel@nongnu.org Cc: kwolf@redhat.com, pbonzini@redhat.com, stefanha@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --sevgSjgUE0IleXoAUqmvqcxlIi4xN3ccC Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 10/24/2013 07:53 AM, Peter Lieven wrote: > 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. >=20 > Signed-off-by: Peter Lieven > --- > v1->v2: As Eric suggested changed the exitcode from 255 to 63. >=20 > 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 >=20 > diff --git a/qemu-img.c b/qemu-img.c > index 926f0a0..bf3fb4f 100644 > --- a/qemu-img.c > +++ b/qemu-img.c > @@ -607,7 +607,7 @@ static int img_check(int argc, char **argv) > if (output_format =3D=3D OFORMAT_HUMAN) { > error_report("This image format does not support checks");= > } > - ret =3D 1; > + ret =3D 63; > goto fail; > } > =20 >=20 --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --sevgSjgUE0IleXoAUqmvqcxlIi4xN3ccC Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.15 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJSaMWeAAoJEKeha0olJ0Nqa5MH/jWszSRoRAQfz2xux1WRHw1d mtymifcS6zU4RzXWpJtQZ5nXPemzFdbtv97iIAAWSGAqantwH6/QCFHZ5IdeQvnF uXeoqkwXCJjR43h7mMaGN47UIH9wXGfbM5Zuf4NhkkZmsbxC0OEtc8GxrM1vYvly x4atwG2jOKH3pcENxYrrc+iDqys4tqVv+M8tYPBmYf1T/RISnYXFjJNJ6no3TU2w FF5bsjNpWob4sxJ58CsbYJXNJsaJYKR316aiP0aY0s4XAwqd3zA0vefXYrF/5Bzs hCHdDnZ9mW/Auy8ALze6fWssLLt2LSCFCS2n1zZRXhs1sNcThSx/5LfYwk6/JuQ= =tKTk -----END PGP SIGNATURE----- --sevgSjgUE0IleXoAUqmvqcxlIi4xN3ccC--