From patchwork Fri Dec 4 13:05:29 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kiszka X-Patchwork-Id: 40328 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 3F736B7BE4 for ; Sat, 5 Dec 2009 00:06:41 +1100 (EST) Received: from localhost ([127.0.0.1]:53376 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NGXrp-00068m-OA for incoming@patchwork.ozlabs.org; Fri, 04 Dec 2009 08:06:37 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NGXqs-00068T-Jg for qemu-devel@nongnu.org; Fri, 04 Dec 2009 08:05:38 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NGXqo-00067t-ST for qemu-devel@nongnu.org; Fri, 04 Dec 2009 08:05:38 -0500 Received: from [199.232.76.173] (port=52833 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NGXqo-00067q-5u for qemu-devel@nongnu.org; Fri, 04 Dec 2009 08:05:34 -0500 Received: from thoth.sbs.de ([192.35.17.2]:15508) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NGXqn-0006CW-K0 for qemu-devel@nongnu.org; Fri, 04 Dec 2009 08:05:33 -0500 Received: from mail1.siemens.de (localhost [127.0.0.1]) by thoth.sbs.de (8.12.11.20060308/8.12.11) with ESMTP id nB4D5U2h004670; Fri, 4 Dec 2009 14:05:30 +0100 Received: from [139.25.109.167] (mchn012c.mchp.siemens.de [139.25.109.167] (may be forged)) by mail1.siemens.de (8.12.11.20060308/8.12.11) with ESMTP id nB4D5U1e012925; Fri, 4 Dec 2009 14:05:30 +0100 Message-ID: <4B190919.9040602@siemens.com> Date: Fri, 04 Dec 2009 14:05:29 +0100 From: Jan Kiszka User-Agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666 MIME-Version: 1.0 To: Anthony Liguori X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.4-2.6 Cc: qemu-devel Subject: [Qemu-devel] [FOR 0.12][PATCH] monitor: Accept input only byte-wise 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 This allows to suspend command interpretation and execution synchronously, e.g. during migration. Signed-off-by: Jan Kiszka --- monitor.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/monitor.c b/monitor.c index 3286ba2..a3be1c8 100644 --- a/monitor.c +++ b/monitor.c @@ -3418,7 +3418,7 @@ static int monitor_can_read(void *opaque) { Monitor *mon = opaque; - return (mon->suspend_cnt == 0) ? 128 : 0; + return (mon->suspend_cnt == 0) ? 1 : 0; } static void monitor_read(void *opaque, const uint8_t *buf, int size)