From patchwork Wed Oct 7 11:10:39 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Shah X-Patchwork-Id: 35260 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 2C821B7B8B for ; Wed, 7 Oct 2009 22:15:06 +1100 (EST) Received: from localhost ([127.0.0.1]:56495 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MvUU2-0001S5-BL for incoming@patchwork.ozlabs.org; Wed, 07 Oct 2009 07:15:02 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MvUQd-0000FG-Tx for qemu-devel@nongnu.org; Wed, 07 Oct 2009 07:11:31 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MvUQY-0000BG-QO for qemu-devel@nongnu.org; Wed, 07 Oct 2009 07:11:31 -0400 Received: from [199.232.76.173] (port=46354 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MvUQY-0000Ao-FM for qemu-devel@nongnu.org; Wed, 07 Oct 2009 07:11:26 -0400 Received: from mx1.redhat.com ([209.132.183.28]:9403) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MvUQX-0007B1-TK for qemu-devel@nongnu.org; Wed, 07 Oct 2009 07:11:26 -0400 Received: from int-mx04.intmail.prod.int.phx2.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.17]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n97BBPhx001177 for ; Wed, 7 Oct 2009 07:11:25 -0400 Received: from localhost (vpn-240-209.phx2.redhat.com [10.3.240.209]) by int-mx04.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id n97BBNKk014002; Wed, 7 Oct 2009 07:11:24 -0400 From: Amit Shah To: qemu-devel@nongnu.org Date: Wed, 7 Oct 2009 16:40:39 +0530 Message-Id: <1254913840-10358-3-git-send-email-amit.shah@redhat.com> In-Reply-To: <1254913840-10358-2-git-send-email-amit.shah@redhat.com> References: <1254913840-10358-1-git-send-email-amit.shah@redhat.com> <1254913840-10358-2-git-send-email-amit.shah@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.17 X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. Cc: Amit Shah Subject: [Qemu-devel] [PATCH 2/3] char: rename CHR_EVENT_RESET to CHR_EVENT_OPENED 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 The char event RESET is emitted when a char device is opened. Give it a better name. Signed-off-by: Amit Shah --- gdbstub.c | 2 +- hw/baum.c | 2 +- hw/usb-serial.c | 2 +- monitor.c | 2 +- qemu-char.c | 2 +- qemu-char.h | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/gdbstub.c b/gdbstub.c index 315f606..055093f 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -2447,7 +2447,7 @@ static void gdb_chr_receive(void *opaque, const uint8_t *buf, int size) static void gdb_chr_event(void *opaque, int event) { switch (event) { - case CHR_EVENT_RESET: + case CHR_EVENT_OPENED: vm_stop(EXCP_INTERRUPT); gdb_has_xml = 0; break; diff --git a/hw/baum.c b/hw/baum.c index 665deab..c66e737 100644 --- a/hw/baum.c +++ b/hw/baum.c @@ -475,7 +475,7 @@ static void baum_send_event(CharDriverState *chr, int event) switch (event) { case CHR_EVENT_BREAK: break; - case CHR_EVENT_RESET: + case CHR_EVENT_OPENED: /* Reset state */ baum->in_buf_used = 0; break; diff --git a/hw/usb-serial.c b/hw/usb-serial.c index e2379c4..d02f6b2 100644 --- a/hw/usb-serial.c +++ b/hw/usb-serial.c @@ -516,7 +516,7 @@ static void usb_serial_event(void *opaque, int event) break; case CHR_EVENT_FOCUS: break; - case CHR_EVENT_RESET: + case CHR_EVENT_OPENED: usb_serial_reset(s); /* TODO: Reset USB port */ break; diff --git a/monitor.c b/monitor.c index f105a2e..692b696 100644 --- a/monitor.c +++ b/monitor.c @@ -3139,7 +3139,7 @@ static void monitor_event(void *opaque, int event) mon->mux_out = 1; break; - case CHR_EVENT_RESET: + case CHR_EVENT_OPENED: monitor_printf(mon, "QEMU %s monitor - type 'help' for more " "information\n", QEMU_VERSION); if (!mon->mux_out) { diff --git a/qemu-char.c b/qemu-char.c index 99ab471..8fde8cf 100644 --- a/qemu-char.c +++ b/qemu-char.c @@ -120,7 +120,7 @@ static void qemu_chr_event(CharDriverState *s, int event) static void qemu_chr_reset_bh(void *opaque) { CharDriverState *s = opaque; - qemu_chr_event(s, CHR_EVENT_RESET); + qemu_chr_event(s, CHR_EVENT_OPENED); qemu_bh_delete(s->bh); s->bh = NULL; } diff --git a/qemu-char.h b/qemu-char.h index c0654bc..05fe15d 100644 --- a/qemu-char.h +++ b/qemu-char.h @@ -10,7 +10,7 @@ #define CHR_EVENT_BREAK 0 /* serial break char */ #define CHR_EVENT_FOCUS 1 /* focus to this terminal (modal input needed) */ -#define CHR_EVENT_RESET 2 /* new connection established */ +#define CHR_EVENT_OPENED 2 /* new connection established */ #define CHR_EVENT_MUX_IN 3 /* mux-focus was set to this terminal */ #define CHR_EVENT_MUX_OUT 4 /* mux-focus will move on */ #define CHR_EVENT_CLOSED 5 /* connection closed */