From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38741) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XCVz9-0007Kq-0d for qemu-devel@nongnu.org; Wed, 30 Jul 2014 11:40:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XCVyw-0002nW-TA for qemu-devel@nongnu.org; Wed, 30 Jul 2014 11:40:10 -0400 Received: from mail-wg0-x22c.google.com ([2a00:1450:400c:c00::22c]:51874) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XCVyw-0002n3-MK for qemu-devel@nongnu.org; Wed, 30 Jul 2014 11:39:58 -0400 Received: by mail-wg0-f44.google.com with SMTP id m15so1369626wgh.3 for ; Wed, 30 Jul 2014 08:39:57 -0700 (PDT) Date: Wed, 30 Jul 2014 16:39:52 +0100 From: Stefan Hajnoczi Message-ID: <20140730153952.GL597@stefanha-thinkpad.redhat.com> References: <20140729080745.19685.60860.malonedeb@wampee.canonical.com> <20140729080745.19685.60860.malonedeb@wampee.canonical.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="gwtGiOGliFx8mAnm" Content-Disposition: inline In-Reply-To: <20140729080745.19685.60860.malonedeb@wampee.canonical.com> Subject: Re: [Qemu-devel] [Bug 1349722] [NEW] qemu-io: Exit code is always zero List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Bug 1349722 <1349722@bugs.launchpad.net> Cc: qemu-devel@nongnu.org --gwtGiOGliFx8mAnm Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jul 29, 2014 at 08:07:44AM -0000, Maria Kustova wrote: > The qemu-io always returns zero on exit independently on errors occurred > during the command execution. >=20 > Example, >=20 > $ qemu-io -c 'write 128 234' /tmp/run1/test-1/test.img >=20 > offset 128 is not sector aligned >=20 > $ echo $? > 0 >=20 >=20 > qemu.git HEAD: 41a1a9c42c4e For single commands it makes sense to return the command success as the exit code. When qemu-io is used interactively or with multiple -c options we need a error handling policy. For this reason it is not totally trivial to implement. Stefan --gwtGiOGliFx8mAnm Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJT2RHIAAoJEJykq7OBq3PIpE4IAIRVMA2ApV+KVue/lovUQmKa 06Tk28VTS02RQxAPbIT1pGX8ZgWHq9As7UP5YZRJlVm3yo+Xsl8MUKjlt7OpZMwc icW8UJX7SWwxASxADGEMbKNhV6V0yk6jYd0/2st870AYQyjKPDMbcHwdx2c/ETGE ZIgwwSR9uXTaqiVTni6oKj8sYvlI/tIpAjJAS3WHKrDxiL1GjA0/LfjmZDsuao0P HzPdFHZ65OraSVD4RToMWaWtWGYOSvHMC3UVd4/t7298LODrzp4AsFbJxc0WsSp5 MlJCcP02rZu+8qIZA+UWpACFqTdU3+yFydCkad+DWq/EwChsPDzcekCbGzuVKzE= =aRVM -----END PGP SIGNATURE----- --gwtGiOGliFx8mAnm--