Received: from eggs.gnu.org ([208.118.235.92]:53271) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UcSlx-0001gf-Gq for qemu-devel@nongnu.org; Tue, 14 May 2013 23:53:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UcSlw-00014n-LQ for qemu-devel@nongnu.org; Tue, 14 May 2013 23:53:01 -0400 Received: from e28smtp04.in.ibm.com ([122.248.162.4]:60555) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UcSlw-00014Z-06 for qemu-devel@nongnu.org; Tue, 14 May 2013 23:53:00 -0400 Received: from /spool/local by e28smtp04.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 15 May 2013 09:17:56 +0530 Received: from d28relay01.in.ibm.com (d28relay01.in.ibm.com [9.184.220.58]) by d28dlp02.in.ibm.com (Postfix) with ESMTP id 90ACD3940023 for ; Wed, 15 May 2013 09:22:54 +0530 (IST) Received: from d28av02.in.ibm.com (d28av02.in.ibm.com [9.184.220.64]) by d28relay01.in.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id r4F3qjMt65732794 for ; Wed, 15 May 2013 09:22:45 +0530 Received: from d28av02.in.ibm.com (loopback [127.0.0.1]) by d28av02.in.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id r4F3qpY5029286 for ; Wed, 15 May 2013 13:52:51 +1000 From: Lei Li Date: Wed, 15 May 2013 11:52:33 +0800 Message-Id: <1368589953-22455-1-git-send-email-lilei@linux.vnet.ibm.com> Subject: [Qemu-devel] [PATCH] chardev: Get filename for new qapi backend List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: aliguori@us.ibm.com, kraxel@redhat.com, Lei Li This patch add the filename when the new qapi backend init from opts. Commit 2c5f488293c7d0cd095635c74157c2526e2c4947 add support for qapi-based chardev initialization, but miss the filename of the char device as below: (qemu) info chardev parallel0: filename=(null) serial0: filename=(null) compat_monitor0: filename=(null) Signed-off-by: Lei Li --- qemu-char.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/qemu-char.c b/qemu-char.c index 30a2ddf..a9f618a 100644 --- a/qemu-char.c +++ b/qemu-char.c @@ -3276,6 +3276,7 @@ CharDriverState *qemu_chr_new_from_opts(QemuOpts *opts, ChardevReturn *ret = NULL; const char *id = qemu_opts_id(opts); const char *bid = NULL; + char *filename = g_strdup(qemu_opt_get(opts, "backend")); if (qemu_opt_get_bool(opts, "mux", 0)) { bid = g_strdup_printf("%s-base", id); @@ -3308,6 +3309,7 @@ CharDriverState *qemu_chr_new_from_opts(QemuOpts *opts, } chr = qemu_chr_find(id); + chr->filename = filename; qapi_out: qapi_free_ChardevBackend(backend); -- 1.7.7.6