From patchwork Tue Jan 4 14:33:26 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Juan Quintela X-Patchwork-Id: 77487 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 019CBB711E for ; Wed, 5 Jan 2011 01:43:32 +1100 (EST) Received: from localhost ([127.0.0.1]:46936 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pa86i-0004yn-Gv for incoming@patchwork.ozlabs.org; Tue, 04 Jan 2011 09:43:28 -0500 Received: from [140.186.70.92] (port=41305 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pa7yD-0000Dp-4Q for qemu-devel@nongnu.org; Tue, 04 Jan 2011 09:34:42 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Pa7y1-0004YC-Mt for qemu-devel@nongnu.org; Tue, 04 Jan 2011 09:34:40 -0500 Received: from mx1.redhat.com ([209.132.183.28]:14449) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Pa7y1-0004Xf-BV for qemu-devel@nongnu.org; Tue, 04 Jan 2011 09:34:29 -0500 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id p04EYSbH012466 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 4 Jan 2011 09:34:28 -0500 Received: from neno.mitica (ovpn-113-93.phx2.redhat.com [10.3.113.93]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id p04EYQ21004900; Tue, 4 Jan 2011 09:34:27 -0500 From: Juan Quintela To: qemu-devel@nongnu.org Date: Tue, 4 Jan 2011 15:33:26 +0100 Message-Id: In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. Subject: [Qemu-devel] [PATCH 1/5] migration: exit with error code X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org exits due to errors should end with error code 1, not zero or negative. Signed-off-by: Juan Quintela --- migration.c | 2 +- vl.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/migration.c b/migration.c index e5ba51c..a8b65e5 100644 --- a/migration.c +++ b/migration.c @@ -62,7 +62,7 @@ void process_incoming_migration(QEMUFile *f) { if (qemu_loadvm_state(f) < 0) { fprintf(stderr, "load of migration failed\n"); - exit(0); + exit(1); } qemu_announce_self(); DPRINTF("successfully loaded vm state\n"); diff --git a/vl.c b/vl.c index 78fcef1..e5349af 100644 --- a/vl.c +++ b/vl.c @@ -3107,7 +3107,7 @@ int main(int argc, char **argv, char **envp) if (ret < 0) { fprintf(stderr, "Migration failed. Exit code %s(%d), exiting.\n", incoming, ret); - exit(ret); + exit(1); } } else if (autostart) { vm_start();