From patchwork Wed Feb 29 14:41:32 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Hajnoczi X-Patchwork-Id: 143739 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 09203B6FA3 for ; Thu, 1 Mar 2012 01:43:46 +1100 (EST) Received: from localhost ([::1]:37732 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S2kkp-0000CP-UF for incoming@patchwork.ozlabs.org; Wed, 29 Feb 2012 09:43:43 -0500 Received: from eggs.gnu.org ([208.118.235.92]:52834) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S2kke-0000Bj-TO for qemu-devel@nongnu.org; Wed, 29 Feb 2012 09:43:38 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S2kkY-0004xf-H1 for qemu-devel@nongnu.org; Wed, 29 Feb 2012 09:43:32 -0500 Received: from e06smtp14.uk.ibm.com ([195.75.94.110]:42530) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S2kkY-0004wy-8z for qemu-devel@nongnu.org; Wed, 29 Feb 2012 09:43:26 -0500 Received: from /spool/local by e06smtp14.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 29 Feb 2012 14:43:20 -0000 Received: from d06nrmr1407.portsmouth.uk.ibm.com (9.149.38.185) by e06smtp14.uk.ibm.com (192.168.101.144) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Wed, 29 Feb 2012 14:43:15 -0000 Received: from d06av08.portsmouth.uk.ibm.com (d06av08.portsmouth.uk.ibm.com [9.149.37.249]) by d06nrmr1407.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q1TEhE5A2547828 for ; Wed, 29 Feb 2012 14:43:15 GMT Received: from d06av08.portsmouth.uk.ibm.com (loopback [127.0.0.1]) by d06av08.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id q1TEhE3P031162 for ; Wed, 29 Feb 2012 07:43:14 -0700 Received: from localhost (gbv55814.uk.ibm.com [9.146.209.27]) by d06av08.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id q1TEhECT031125; Wed, 29 Feb 2012 07:43:14 -0700 From: Stefan Hajnoczi To: Date: Wed, 29 Feb 2012 14:41:32 +0000 Message-Id: <1330526492-2539-1-git-send-email-stefanha@linux.vnet.ibm.com> X-Mailer: git-send-email 1.7.9 x-cbid: 12022914-1948-0000-0000-0000010FD026 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 195.75.94.110 Cc: Kevin Wolf , Stefan Hajnoczi Subject: [Qemu-devel] [PATCH] qemu-tool: revert cpu_get_clock() abort(3) X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Despite the fact that the qemu-tool environment has no guest running and vm_clock therefore does not make sense, there is code that gets the vm_clock time even in qemu-tool. Therefore, revert the abort(3) call and just return 0 like we used to. This unbreaks qemu-img/qemu-io with QED and Kevin has also expressed interest in this for qcow2. Signed-off-by: Stefan Hajnoczi --- qemu-tool.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/qemu-tool.c b/qemu-tool.c index 183a583..edb84f5 100644 --- a/qemu-tool.c +++ b/qemu-tool.c @@ -61,7 +61,7 @@ void monitor_protocol_event(MonitorEvent event, QObject *data) int64_t cpu_get_clock(void) { - abort(); + return 0; } int64_t cpu_get_icount(void)