From patchwork Tue Oct 20 07:03:00 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Shah X-Patchwork-Id: 36439 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 E4D2DB7B97 for ; Tue, 20 Oct 2009 18:07:20 +1100 (EST) Received: from localhost ([127.0.0.1]:38395 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N08oQ-0001Fd-1S for incoming@patchwork.ozlabs.org; Tue, 20 Oct 2009 03:07:18 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N08lC-0000Cb-4A for qemu-devel@nongnu.org; Tue, 20 Oct 2009 03:03:58 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N08l6-0000AZ-Q0 for qemu-devel@nongnu.org; Tue, 20 Oct 2009 03:03:56 -0400 Received: from [199.232.76.173] (port=52014 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N08l6-0000AS-HH for qemu-devel@nongnu.org; Tue, 20 Oct 2009 03:03:52 -0400 Received: from mx20.gnu.org ([199.232.41.8]:11410) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1N08l5-000675-LN for qemu-devel@nongnu.org; Tue, 20 Oct 2009 03:03:51 -0400 Received: from mx1.redhat.com ([209.132.183.28]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1N08l4-0003ZX-HV for qemu-devel@nongnu.org; Tue, 20 Oct 2009 03:03:50 -0400 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n9K73n4K009152 for ; Tue, 20 Oct 2009 03:03:49 -0400 Received: from localhost (vpn-12-92.rdu.redhat.com [10.11.12.92]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id n9K73lRY023187; Tue, 20 Oct 2009 03:03:48 -0400 From: Amit Shah To: qemu-devel@nongnu.org Date: Tue, 20 Oct 2009 12:33:00 +0530 Message-Id: <1256022182-15570-3-git-send-email-amit.shah@redhat.com> In-Reply-To: <1256022182-15570-2-git-send-email-amit.shah@redhat.com> References: <1256022182-15570-1-git-send-email-amit.shah@redhat.com> <1256022182-15570-2-git-send-email-amit.shah@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12 X-detected-operating-system: by mx20.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) Cc: Amit Shah Subject: [Qemu-devel] [PATCH 2/4] 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 3424e60..2566f4a 100644 --- a/monitor.c +++ b/monitor.c @@ -3470,7 +3470,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 8f7f81c..4757689 100644 --- a/qemu-char.c +++ b/qemu-char.c @@ -119,7 +119,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 */