From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58659) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bv4k6-0007xr-4U for qemu-devel@nongnu.org; Fri, 14 Oct 2016 11:49:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bv4k5-0004nL-9B for qemu-devel@nongnu.org; Fri, 14 Oct 2016 11:49:54 -0400 Date: Fri, 14 Oct 2016 17:49:46 +0200 From: Kevin Wolf Message-ID: <20161014154946.GJ4473@noname.redhat.com> References: <1476068829-17426-1-git-send-email-xutian@redhat.com> <20161014153957.GE3482@stefanha-x1.localdomain> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="HlL+5n6rz5pIUxbD" Content-Disposition: inline In-Reply-To: <20161014153957.GE3482@stefanha-x1.localdomain> Subject: Re: [Qemu-devel] [Qemu-block] [PATCH] qemu-img: fix failed qemu-img command return zero exit code defeat List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: Xu Tian , qemu-devel@nongnu.org, qemu-block@nongnu.org, famz@redhat.com, mreitz@redhat.com --HlL+5n6rz5pIUxbD Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Am 14.10.2016 um 17:39 hat Stefan Hajnoczi geschrieben: > On Mon, Oct 10, 2016 at 11:07:09AM +0800, Xu Tian wrote: > > If backing file can not open when do image rebase, flag 'ret' not > > assign a non-zero value, then qemu-img process exit with code zero. > > Assign value '-1' to flag 'ret' after report error message to fix > > this defeat. >=20 > I suggest rewording the commit description: >=20 > img_rebase() returns 0 (success) when opening the backing file fails > because 'ret' isn't set. I already reworded it a bit when I applied the patch (it was sent twice somehow and I replied to the other one): If the backing file cannot be opened when doing qemu-img rebase, the variable 'ret' was not assigned a non-zero value, and the qemu-img process terminated with exit code zero. Fix this. Kevin --HlL+5n6rz5pIUxbD Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iQIcBAEBAgAGBQJYAP6aAAoJEH8JsnLIjy/WMpAP/RtLUV0vIffoxLBSvd5AS7Gh IUyxK5x9hJcG7EU4BUPMqCXQ8T2n5x70pseIuG19PLdqrmnJ9oa02lgDJMamtiX+ D2zFg41W++rgNRRFJ4BLn9c5YIsGGgaKBZQtn+1QJiH86a+tSEDKK2rYl96GZWok v3cn45AsZVvVOzcS7a4Nx39+4ArGZxOIhrDCnMefjMCgzeyKCG0gMVAigH4w+k02 2yKhg6aDumN9rRjdToNnzQPAxk2+ihSoqHN/LYtev/BtJ8zjbQJMp9hG3hW2w+dp E4t/xJH/2v4PMo25SjndM3jsRHWfMemdLJ+lV3OW9Z0EYZaRp/KUUtNxBBbymroU BtUZ6KK2Pd+xkLzU3iNF26yFndwS+6/cIx+3SWURU1/ItbhTZekFDll8oBvfM6p5 +UK2AwzpS44wcS/lM2jz77NvQqED3UaIhwpIzgsePpAnvynFJd5BdhcTb5522Uwk sB2OsCY/AIICN/OtUdJJJOlSEyb2XZ1qUzIR7IO12z0unpuGN/Jh8P6KLakfJDFD A+kxzujhnzSSPhiHXv67ldpnh1CGQh1c7ubSsYfvgLeSAb7U3tPgV44eORKXeFKs l4gABpzdXcwXsiYxHzDteFSa97jUrQg76T+oHGaA5oKkos5ygqUV75yTZhMobytS Ag0hNaTlC4rqr6fMGt+R =Z80M -----END PGP SIGNATURE----- --HlL+5n6rz5pIUxbD--