From patchwork Mon Aug 15 16:17:36 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anthony Liguori X-Patchwork-Id: 110074 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 47DE4B6F62 for ; Tue, 16 Aug 2011 02:58:30 +1000 (EST) Received: from localhost ([::1]:37511 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QszsK-0004lm-3P for incoming@patchwork.ozlabs.org; Mon, 15 Aug 2011 12:18:52 -0400 Received: from eggs.gnu.org ([140.186.70.92]:56643) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qszrh-0003MX-Bk for qemu-devel@nongnu.org; Mon, 15 Aug 2011 12:18:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qszrc-0000oQ-5z for qemu-devel@nongnu.org; Mon, 15 Aug 2011 12:18:10 -0400 Received: from e9.ny.us.ibm.com ([32.97.182.139]:50533) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qszrc-0000oE-0n for qemu-devel@nongnu.org; Mon, 15 Aug 2011 12:18:08 -0400 Received: from d01relay03.pok.ibm.com (d01relay03.pok.ibm.com [9.56.227.235]) by e9.ny.us.ibm.com (8.14.4/8.13.1) with ESMTP id p7FFihRA003749 for ; Mon, 15 Aug 2011 11:44:43 -0400 Received: from d01av04.pok.ibm.com (d01av04.pok.ibm.com [9.56.224.64]) by d01relay03.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id p7FGI6L0246958 for ; Mon, 15 Aug 2011 12:18:06 -0400 Received: from d01av04.pok.ibm.com (loopback [127.0.0.1]) by d01av04.pok.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id p7FGI4D9003933 for ; Mon, 15 Aug 2011 12:18:05 -0400 Received: from titi.local (sig-9-49-139-190.mts.ibm.com [9.49.139.190]) by d01av04.pok.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id p7FGHiZ4001510; Mon, 15 Aug 2011 12:18:01 -0400 From: Anthony Liguori To: qemu-devel@nongnu.org Date: Mon, 15 Aug 2011 11:17:36 -0500 Message-Id: <1313425061-12854-10-git-send-email-aliguori@us.ibm.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1313425061-12854-1-git-send-email-aliguori@us.ibm.com> References: <1313425061-12854-1-git-send-email-aliguori@us.ibm.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Received-From: 32.97.182.139 Cc: Anthony Liguori Subject: [Qemu-devel] [PATCH 09/14] char: rename qemu_chr_open() -> qemu_chr_new() 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 Signed-off-by: Anthony Liguori --- gdbstub.c | 2 +- hw/mips_malta.c | 4 ++-- hw/omap2.c | 2 +- hw/omap_uart.c | 8 ++++---- hw/usb-serial.c | 4 ++-- hw/xen_console.c | 2 +- net/slirp.c | 2 +- qemu-char.c | 2 +- qemu-char.h | 2 +- vl.c | 8 ++++---- 10 files changed, 18 insertions(+), 18 deletions(-) diff --git a/gdbstub.c b/gdbstub.c index 058c626..f99f87f 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -2764,7 +2764,7 @@ int gdbserver_start(const char *device) sigaction(SIGINT, &act, NULL); } #endif - chr = qemu_chr_open("gdb", device, NULL); + chr = qemu_chr_new("gdb", device, NULL); if (!chr) return -1; diff --git a/hw/mips_malta.c b/hw/mips_malta.c index 9021752..e52a7f8 100644 --- a/hw/mips_malta.c +++ b/hw/mips_malta.c @@ -443,7 +443,7 @@ static MaltaFPGAState *malta_fpga_init(target_phys_addr_t base, qemu_irq uart_ir /* 0xa00 is less than a page, so will still get the right offsets. */ cpu_register_physical_memory(base + 0xa00, 0x100000 - 0xa00, malta); - s->display = qemu_chr_open("fpga", "vc:320x200", malta_fpga_led_init); + s->display = qemu_chr_new("fpga", "vc:320x200", malta_fpga_led_init); #ifdef TARGET_WORDS_BIGENDIAN s->uart = serial_mm_init(base + 0x900, 3, uart_irq, 230400, uart_chr, 1, 1); @@ -784,7 +784,7 @@ void mips_malta_init (ram_addr_t ram_size, if (!serial_hds[i]) { char label[32]; snprintf(label, sizeof(label), "serial%d", i); - serial_hds[i] = qemu_chr_open(label, "null", NULL); + serial_hds[i] = qemu_chr_new(label, "null", NULL); } } diff --git a/hw/omap2.c b/hw/omap2.c index 919318f..cb860dc 100644 --- a/hw/omap2.c +++ b/hw/omap2.c @@ -782,7 +782,7 @@ static struct omap_sti_s *omap_sti_init(struct omap_target_agent_s *ta, s->irq = irq; omap_sti_reset(s); - s->chr = chr ?: qemu_chr_open("null", "null", NULL); + s->chr = chr ?: qemu_chr_new("null", "null", NULL); iomemtype = l4_register_io_memory(omap_sti_readfn, omap_sti_writefn, s); diff --git a/hw/omap_uart.c b/hw/omap_uart.c index 9cee81d..bdf6212 100644 --- a/hw/omap_uart.c +++ b/hw/omap_uart.c @@ -62,11 +62,11 @@ struct omap_uart_s *omap_uart_init(target_phys_addr_t base, s->irq = irq; #ifdef TARGET_WORDS_BIGENDIAN s->serial = serial_mm_init(base, 2, irq, omap_clk_getrate(fclk)/16, - chr ?: qemu_chr_open(label, "null", NULL), 1, + chr ?: qemu_chr_new(label, "null", NULL), 1, 1); #else s->serial = serial_mm_init(base, 2, irq, omap_clk_getrate(fclk)/16, - chr ?: qemu_chr_open(label, "null", NULL), 1, + chr ?: qemu_chr_new(label, "null", NULL), 1, 0); #endif return s; @@ -185,12 +185,12 @@ void omap_uart_attach(struct omap_uart_s *s, CharDriverState *chr) #ifdef TARGET_WORDS_BIGENDIAN s->serial = serial_mm_init(s->base, 2, s->irq, omap_clk_getrate(s->fclk) / 16, - chr ?: qemu_chr_open("null", "null", NULL), 1, + chr ?: qemu_chr_new("null", "null", NULL), 1, 1); #else s->serial = serial_mm_init(s->base, 2, s->irq, omap_clk_getrate(s->fclk) / 16, - chr ?: qemu_chr_open("null", "null", NULL), 1, + chr ?: qemu_chr_new("null", "null", NULL), 1, 0); #endif } diff --git a/hw/usb-serial.c b/hw/usb-serial.c index a0fbfca..0637ee9 100644 --- a/hw/usb-serial.c +++ b/hw/usb-serial.c @@ -538,7 +538,7 @@ static USBDevice *usb_serial_init(const char *filename) filename++; snprintf(label, sizeof(label), "usbserial%d", index++); - cdrv = qemu_chr_open(label, filename, NULL); + cdrv = qemu_chr_new(label, filename, NULL); if (!cdrv) return NULL; @@ -561,7 +561,7 @@ static USBDevice *usb_braille_init(const char *unused) USBDevice *dev; CharDriverState *cdrv; - cdrv = qemu_chr_open("braille", "braille", NULL); + cdrv = qemu_chr_new("braille", "braille", NULL); if (!cdrv) return NULL; diff --git a/hw/xen_console.c b/hw/xen_console.c index e218bb8..7fe6164 100644 --- a/hw/xen_console.c +++ b/hw/xen_console.c @@ -202,7 +202,7 @@ static int con_init(struct XenDevice *xendev) con->chr = serial_hds[con->xendev.dev]; } else { snprintf(label, sizeof(label), "xencons%d", con->xendev.dev); - con->chr = qemu_chr_open(label, output, NULL); + con->chr = qemu_chr_new(label, output, NULL); } xenstore_store_pv_console_info(con->xendev.dev, con->chr); diff --git a/net/slirp.c b/net/slirp.c index 157b80a..1e3a529 100644 --- a/net/slirp.c +++ b/net/slirp.c @@ -616,7 +616,7 @@ static int slirp_guestfwd(SlirpState *s, const char *config_str, fwd = qemu_malloc(sizeof(struct GuestFwd)); snprintf(buf, sizeof(buf), "guestfwd.tcp.%d", port); - fwd->hd = qemu_chr_open(buf, p, NULL); + fwd->hd = qemu_chr_new(buf, p, NULL); if (!fwd->hd) { error_report("could not open guest forwarding device '%s'", buf); qemu_free(fwd); diff --git a/qemu-char.c b/qemu-char.c index e191c11..569e989 100644 --- a/qemu-char.c +++ b/qemu-char.c @@ -2603,7 +2603,7 @@ CharDriverState *qemu_chr_open_opts(QemuOpts *opts, return chr; } -CharDriverState *qemu_chr_open(const char *label, const char *filename, void (*init)(struct CharDriverState *s)) +CharDriverState *qemu_chr_new(const char *label, const char *filename, void (*init)(struct CharDriverState *s)) { const char *p; CharDriverState *chr; diff --git a/qemu-char.h b/qemu-char.h index a487454..097f0e6 100644 --- a/qemu-char.h +++ b/qemu-char.h @@ -80,7 +80,7 @@ struct CharDriverState { QemuOpts *qemu_chr_parse_compat(const char *label, const char *filename); CharDriverState *qemu_chr_open_opts(QemuOpts *opts, void (*init)(struct CharDriverState *s)); -CharDriverState *qemu_chr_open(const char *label, const char *filename, void (*init)(struct CharDriverState *s)); +CharDriverState *qemu_chr_new(const char *label, const char *filename, void (*init)(struct CharDriverState *s)); void qemu_chr_fe_set_echo(struct CharDriverState *chr, bool echo); void qemu_chr_fe_open(struct CharDriverState *chr); void qemu_chr_fe_close(struct CharDriverState *chr); diff --git a/vl.c b/vl.c index c714127..7143d15 100644 --- a/vl.c +++ b/vl.c @@ -1828,7 +1828,7 @@ static int serial_parse(const char *devname) exit(1); } snprintf(label, sizeof(label), "serial%d", index); - serial_hds[index] = qemu_chr_open(label, devname, NULL); + serial_hds[index] = qemu_chr_new(label, devname, NULL); if (!serial_hds[index]) { fprintf(stderr, "qemu: could not open serial device '%s': %s\n", devname, strerror(errno)); @@ -1850,7 +1850,7 @@ static int parallel_parse(const char *devname) exit(1); } snprintf(label, sizeof(label), "parallel%d", index); - parallel_hds[index] = qemu_chr_open(label, devname, NULL); + parallel_hds[index] = qemu_chr_new(label, devname, NULL); if (!parallel_hds[index]) { fprintf(stderr, "qemu: could not open parallel device '%s': %s\n", devname, strerror(errno)); @@ -1881,7 +1881,7 @@ static int virtcon_parse(const char *devname) qemu_opt_set(dev_opts, "driver", "virtconsole"); snprintf(label, sizeof(label), "virtcon%d", index); - virtcon_hds[index] = qemu_chr_open(label, devname, NULL); + virtcon_hds[index] = qemu_chr_new(label, devname, NULL); if (!virtcon_hds[index]) { fprintf(stderr, "qemu: could not open virtio console '%s': %s\n", devname, strerror(errno)); @@ -1897,7 +1897,7 @@ static int debugcon_parse(const char *devname) { QemuOpts *opts; - if (!qemu_chr_open("debugcon", devname, NULL)) { + if (!qemu_chr_new("debugcon", devname, NULL)) { exit(1); } opts = qemu_opts_create(qemu_find_opts("device"), "debugcon", 1);