From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46636) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XNP4B-0007ER-3Y for qemu-devel@nongnu.org; Fri, 29 Aug 2014 12:30:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XNP44-0002gc-Ux for qemu-devel@nongnu.org; Fri, 29 Aug 2014 12:30:23 -0400 Received: from mx1.redhat.com ([209.132.183.28]:51228) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XNP44-0002fW-Nu for qemu-devel@nongnu.org; Fri, 29 Aug 2014 12:30:16 -0400 From: Stefan Hajnoczi Date: Fri, 29 Aug 2014 17:29:31 +0100 Message-Id: <1409329803-20744-4-git-send-email-stefanha@redhat.com> In-Reply-To: <1409329803-20744-1-git-send-email-stefanha@redhat.com> References: <1409329803-20744-1-git-send-email-stefanha@redhat.com> Subject: [Qemu-devel] [PULL 03/35] qemu-img: fix img_commit() error return value List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Peter Maydell , Stefan Hajnoczi The img_commit() return value is a process exit code. Use 1 for failure instead of -1. The other failure paths in this function already use 1. Signed-off-by: Stefan Hajnoczi Reviewed-by: Max Reitz --- qemu-img.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qemu-img.c b/qemu-img.c index 2052b14..863798e 100644 --- a/qemu-img.c +++ b/qemu-img.c @@ -752,7 +752,7 @@ static int img_commit(int argc, char **argv) ret = bdrv_parse_cache_flags(cache, &flags); if (ret < 0) { error_report("Invalid cache option: %s", cache); - return -1; + return 1; } bs = bdrv_new_open("image", filename, fmt, flags, true, quiet); -- 1.9.3