From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:36739) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UejoT-0003Ur-Qc for qemu-devel@nongnu.org; Tue, 21 May 2013 06:29:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UejoL-0003NW-0v for qemu-devel@nongnu.org; Tue, 21 May 2013 06:29:01 -0400 Received: from e23smtp03.au.ibm.com ([202.81.31.145]:37087) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UejoI-0003IA-MH for qemu-devel@nongnu.org; Tue, 21 May 2013 06:28:52 -0400 Received: from /spool/local by e23smtp03.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 21 May 2013 20:20:16 +1000 Received: from d23relay03.au.ibm.com (d23relay03.au.ibm.com [9.190.235.21]) by d23dlp03.au.ibm.com (Postfix) with ESMTP id 29F77357804E for ; Tue, 21 May 2013 20:28:42 +1000 (EST) Received: from d23av01.au.ibm.com (d23av01.au.ibm.com [9.190.234.96]) by d23relay03.au.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id r4LASY2q16449724 for ; Tue, 21 May 2013 20:28:34 +1000 Received: from d23av01.au.ibm.com (loopback [127.0.0.1]) by d23av01.au.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id r4LASftF009579 for ; Tue, 21 May 2013 20:28:41 +1000 From: Lei Li Date: Tue, 21 May 2013 18:27:59 +0800 Message-Id: <1369132079-11377-3-git-send-email-lilei@linux.vnet.ibm.com> In-Reply-To: <1369132079-11377-1-git-send-email-lilei@linux.vnet.ibm.com> References: <1369132079-11377-1-git-send-email-lilei@linux.vnet.ibm.com> Subject: [Qemu-devel] [PATCH 2/2] 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, Lei Li , armbru@redhat.com, kraxel@redhat.com, pbonzini@redhat.com This patch sets the filename when the new qapi backend init from opts. The previous patch and discussions as link below: http://patchwork.ozlabs.org/patch/243896/ If anyone who have better idea to fix this please let me know your suggestions. 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 ebeed04..781e969 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