Chardev related fixes
cover Chardev related fixes
This series tries to fix the consistency of char devices udp and ringbuf and a regression of chardev filename.
Lei Li (3):
chardev: Make consistent with udp device for new qapi backend
chardev: Make the name of ringbuf device consistent
chardev: Get filename for new qapi backend
qapi-schema.json | 10 +++++----- qemu-char.c | 24 +++++++++++++----------- 2 files changed, 18 insertions(+), 16 deletions(-)
PATCH 1/3 chardev: Make consistent with udp device for new qapi backend
When register and open a chardev udp, the backend name should be udp not dgram, and we do not have backend dgram in the chardev list. This patch makes the new qapi udp backend consistent with the original udp device.
--- qapi-schema.json | 8 ++++---- qemu-char.c | 10 +++++----- 2 files changed, 9 insertions(+), 9 deletions(-)
qapi-schema.json +4 -4
@@ -3210,7 +3210,7 @@ '*telnet' : 'bool' } } ## -# @ChardevDgram: +# @ChardevUdp: # # Configuration info for datagram socket chardevs. #
@@ -3219,8 +3219,8 @@ # # Since: 1.5 ## -{ 'type': 'ChardevDgram', 'data': { 'remote' : 'SocketAddress', - '*local' : 'SocketAddress' } } +{ 'type': 'ChardevUdp', 'data': { 'remote' : 'SocketAddress', + '*local' : 'SocketAddress' } } ## # @ChardevMux:
@@ -3310,7 +3310,7 @@ 'parallel': 'ChardevHostdev', 'pipe' : 'ChardevHostdev', 'socket' : 'ChardevSocket', - 'dgram' : 'ChardevDgram', + 'udp' : 'ChardevUdp', 'pty' : 'ChardevDummy', 'null' : 'ChardevDummy', 'mux' : 'ChardevMux',
qemu-char.c +5 -5
@@ -3698,12 +3698,12 @@ static CharDriverState *qmp_chardev_open_socket(ChardevSocket *sock, is_telnet, is_waitconnect, errp); } -static CharDriverState *qmp_chardev_open_dgram (ChardevDgram *dgram, -Error **errp) +static CharDriverState *qmp_chardev_open_udp (ChardevUdp *udp, +Error **errp) {int fd; - fd =socket_dgram (dgram->remote, dgram->local, errp); + fd =socket_dgram (udp->remote, udp->local, errp);if (error_is_set (errp)) {return NULL ; }
@@ -3739,8 +3739,8 @@ ChardevReturn *qmp_chardev_add(const char *id, ChardevBackend *backend,case CHARDEV_BACKEND_KIND_SOCKET : chr =qmp_chardev_open_socket (backend->socket, errp);break ; -case CHARDEV_BACKEND_KIND_DGRAM : - chr =qmp_chardev_open_dgram (backend->dgram, errp); +case CHARDEV_BACKEND_KIND_UDP : + chr =qmp_chardev_open_udp (backend->udp, errp);break ;#ifdef HAVE_CHARDEV_TTY case CHARDEV_BACKEND_KIND_PTY :
Signature · 1 line
1.7.7.6
Re: [Qemu-devel] [PATCH for-1.5? 1/3] chardev: Make consistent with udp device for new qapi backend
Il 20/05/2013 08:51, Lei Li ha scritto:
Quoted 4 lines
When register and open a chardev udp, the backend name should be udp not dgram, and we do not have backend dgram in the chardev list. This patch makes the new qapi udp backend consistent with the original udp device.
This changes the QMP API, so it has to go into 1.5 or never.
Paolo
Quoted 71 lines
Signed-off-by Lei Li <[email protected]>--- qapi-schema.json | 8 ++++---- qemu-char.c | 10 +++++----- 2 files changed, 9 insertions(+), 9 deletions(-)qapi-schema.json +4
-4@@ -3210,7 +3210,7 @@ '*telnet' : 'bool' } } ## -# @ChardevDgram: +# @ChardevUdp: # # Configuration info for datagram socket chardevs. #@@ -3219,8 +3219,8 @@ # # Since: 1.5 ## -{ 'type': 'ChardevDgram', 'data': { 'remote' : 'SocketAddress', - '*local' : 'SocketAddress' } } +{ 'type': 'ChardevUdp', 'data': { 'remote' : 'SocketAddress', + '*local' : 'SocketAddress' } } ## # @ChardevMux:@@ -3310,7 +3310,7 @@ 'parallel': 'ChardevHostdev', 'pipe' : 'ChardevHostdev', 'socket' : 'ChardevSocket', - 'dgram' : 'ChardevDgram', + 'udp' : 'ChardevUdp', 'pty' : 'ChardevDummy', 'null' : 'ChardevDummy', 'mux' : 'ChardevMux',qemu-char.c +5
-5@@ -3698,12 +3698,12 @@ static CharDriverState *qmp_chardev_open_socket(ChardevSocket *sock, is_telnet, is_waitconnect, errp); } -static CharDriverState *qmp_chardev_open_dgram (ChardevDgram *dgram, -Error **errp) +static CharDriverState *qmp_chardev_open_udp (ChardevUdp *udp, +Error **errp) {int fd; - fd =socket_dgram (dgram->remote, dgram->local, errp); + fd =socket_dgram (udp->remote, udp->local, errp);if (error_is_set (errp)) {return NULL ; }@@ -3739,8 +3739,8 @@ ChardevReturn *qmp_chardev_add(const char *id, ChardevBackend *backend,case CHARDEV_BACKEND_KIND_SOCKET : chr =qmp_chardev_open_socket (backend->socket, errp);break ; -case CHARDEV_BACKEND_KIND_DGRAM : - chr =qmp_chardev_open_dgram (backend->dgram, errp); +case CHARDEV_BACKEND_KIND_UDP : + chr =qmp_chardev_open_udp (backend->udp, errp);break ;#ifdef HAVE_CHARDEV_TTY case CHARDEV_BACKEND_KIND_PTY :
Re: [Qemu-devel] [PATCH 1/3] chardev: Make consistent with udp device for new qapi backend
In reply to Lei LiQuoted 16 lines · Lei Li
When register and open a chardev udp, the backend name should be udp not dgram, and we do not have backend dgram in the chardev list. This patch makes the new qapi udp backend consistent with the original udp device.
Signed-off-by Lei Li <[email protected]>--- qapi-schema.json | 8 ++++---- qemu-char.c | 10 +++++----- 2 files changed, 9 insertions(+), 9 deletions(-)qapi-schema.json +0
-0
qapi-schema.json line 3213
Quoted 5 lines
qapi-schema.json +1
-1@@ -3210,7 +3210,7 @@ '*telnet' : 'bool' } } ## -# @ChardevDgram: +# @ChardevUdp:
This rename is okay,
qapi-schema.json line 3313
Quoted 6 lines
qapi-schema.json +1
-1@@ -3310,7 +3310,7 @@ 'parallel': 'ChardevHostdev', 'pipe' : 'ChardevHostdev', 'socket' : 'ChardevSocket', - 'dgram' : 'ChardevDgram', + 'udp' : 'ChardevUdp',
but this rename would be ABI-visible if it doesn't make the release.
Signature · 2 lines
Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
PATCH 2/3 chardev: Make the name of ringbuf device consistent
In reply to Lei LiNow we have ringbuf char device, but the backend name of it is a little confusion. We actually register it by 'memory', but the description in qemu-option, the name of open functions and the new api backend called it 'ringbuf'. It should keep consistent. This patch named it all to 'ringbuf'.
--- qapi-schema.json | 2 +- qemu-char.c | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-)
qapi-schema.json +1 -1
@@ -3321,7 +3321,7 @@ 'spicevmc' : 'ChardevSpiceChannel', 'spiceport' : 'ChardevSpicePort', 'vc' : 'ChardevVC', - 'memory' : 'ChardevRingbuf' } } + 'ringbuf': 'ChardevRingbuf' } } ## # @ChardevReturn:
qemu-char.c +6 -6
@@ -3195,12 +3195,12 @@ static void qemu_chr_parse_ringbuf(QemuOpts *opts, ChardevBackend *backend, {int val; - backend->memory =g_new0 (ChardevRingbuf,1 ); + backend->ringbuf =g_new0 (ChardevRingbuf,1 ); val =qemu_opt_get_number (opts,"size" ,0 );if (val !=0 ) { - backend->memory->has_size = true; - backend->memory->size = val; + backend->ringbuf->has_size = true; + backend->ringbuf->size = val; } }
@@ -3786,8 +3786,8 @@ ChardevReturn *qmp_chardev_add(const char *id, ChardevBackend *backend,case CHARDEV_BACKEND_KIND_VC : chr =vc_init (backend->vc);break ; -case CHARDEV_BACKEND_KIND_MEMORY : - chr =qemu_chr_open_ringbuf (backend->memory, errp); +case CHARDEV_BACKEND_KIND_RINGBUF : + chr =qemu_chr_open_ringbuf (backend->ringbuf, errp);break ;default :error_setg (errp,"unknown chardev backend (%d)" , backend->kind);
@@ -3831,7 +3831,7 @@ static void register_types(void)register_char_driver_qapi ("null" ,CHARDEV_BACKEND_KIND_NULL ,NULL );register_char_driver ("socket" , qemu_chr_open_socket);register_char_driver ("udp" , qemu_chr_open_udp); -register_char_driver_qapi ("memory" ,CHARDEV_BACKEND_KIND_MEMORY , +register_char_driver_qapi ("ringbuf" ,CHARDEV_BACKEND_KIND_RINGBUF , qemu_chr_parse_ringbuf);register_char_driver_qapi ("file" ,CHARDEV_BACKEND_KIND_FILE , qemu_chr_parse_file_out);
Signature · 1 line
1.7.7.6
Re: [Qemu-devel] [PATCH 2/3] chardev: Make the name of ringbuf device consistent
Il 20/05/2013 08:51, Lei Li ha scritto:
Quoted 58 lines
Now we have ringbuf char device, but the backend name of it is a little confusion. We actually register it by 'memory', but the description in qemu-option, the name of open functions and the new api backend called it 'ringbuf'. It should keep consistent. This patch named it all to 'ringbuf'.
Signed-off-by Lei Li <[email protected]>--- qapi-schema.json | 2 +- qemu-char.c | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-)qapi-schema.json +1
-1@@ -3321,7 +3321,7 @@ 'spicevmc' : 'ChardevSpiceChannel', 'spiceport' : 'ChardevSpicePort', 'vc' : 'ChardevVC', - 'memory' : 'ChardevRingbuf' } } + 'ringbuf': 'ChardevRingbuf' } } ## # @ChardevReturn:qemu-char.c +5
-5@@ -3195,12 +3195,12 @@ static void qemu_chr_parse_ringbuf(QemuOpts *opts, ChardevBackend *backend, {int val; - backend->memory =g_new0 (ChardevRingbuf,1 ); + backend->ringbuf =g_new0 (ChardevRingbuf,1 ); val =qemu_opt_get_number (opts,"size" ,0 );if (val !=0 ) { - backend->memory->has_size = true; - backend->memory->size = val; + backend->ringbuf->has_size = true; + backend->ringbuf->size = val; } }@@ -3786,8 +3786,8 @@ ChardevReturn *qmp_chardev_add(const char *id, ChardevBackend *backend,case CHARDEV_BACKEND_KIND_VC : chr =vc_init (backend->vc);break ; -case CHARDEV_BACKEND_KIND_MEMORY : - chr =qemu_chr_open_ringbuf (backend->memory, errp); +case CHARDEV_BACKEND_KIND_RINGBUF : + chr =qemu_chr_open_ringbuf (backend->ringbuf, errp);break ;default :error_setg (errp,"unknown chardev backend (%d)" , backend->kind);
qemu-char.c static void register_types(void) · line 3837
Quoted 8 lines
qemu-char.c +1
-1@@ -3831,7 +3831,7 @@ static void register_types(void)register_char_driver_qapi ("null" ,CHARDEV_BACKEND_KIND_NULL ,NULL );register_char_driver ("socket" , qemu_chr_open_socket);register_char_driver ("udp" , qemu_chr_open_udp); -register_char_driver_qapi ("memory" ,CHARDEV_BACKEND_KIND_MEMORY , +register_char_driver_qapi ("ringbuf" ,CHARDEV_BACKEND_KIND_RINGBUF , qemu_chr_parse_ringbuf);register_char_driver_qapi ("file" ,CHARDEV_BACKEND_KIND_FILE , qemu_chr_parse_file_out);
Same here as for patch 1.
Paolo
Re: [Qemu-devel] [PATCH 2/3] chardev: Make the name of ringbuf device consistent
Il 20/05/2013 12:43, Paolo Bonzini ha scritto:
Quoted 61 lines
Il 20/05/2013 08:51, Lei Li ha scritto:
Quoted 60 lines
Now we have ringbuf char device, but the backend name of it is a little confusion. We actually register it by 'memory', but the description in qemu-option, the name of open functions and the new api backend called it 'ringbuf'. It should keep consistent. This patch named it all to 'ringbuf'.
Signed-off-by Lei Li <[email protected]>--- qapi-schema.json | 2 +- qemu-char.c | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-)qapi-schema.json +1
-1@@ -3321,7 +3321,7 @@ 'spicevmc' : 'ChardevSpiceChannel', 'spiceport' : 'ChardevSpicePort', 'vc' : 'ChardevVC', - 'memory' : 'ChardevRingbuf' } } + 'ringbuf': 'ChardevRingbuf' } } ## # @ChardevReturn:qemu-char.c +5
-5@@ -3195,12 +3195,12 @@ static void qemu_chr_parse_ringbuf(QemuOpts *opts, ChardevBackend *backend, {int val; - backend->memory =g_new0 (ChardevRingbuf,1 ); + backend->ringbuf =g_new0 (ChardevRingbuf,1 ); val =qemu_opt_get_number (opts,"size" ,0 );if (val !=0 ) { - backend->memory->has_size = true; - backend->memory->size = val; + backend->ringbuf->has_size = true; + backend->ringbuf->size = val; } }@@ -3786,8 +3786,8 @@ ChardevReturn *qmp_chardev_add(const char *id, ChardevBackend *backend,case CHARDEV_BACKEND_KIND_VC : chr =vc_init (backend->vc);break ; -case CHARDEV_BACKEND_KIND_MEMORY : - chr =qemu_chr_open_ringbuf (backend->memory, errp); +case CHARDEV_BACKEND_KIND_RINGBUF : + chr =qemu_chr_open_ringbuf (backend->ringbuf, errp);break ;default :error_setg (errp,"unknown chardev backend (%d)" , backend->kind);@@ -3831,7 +3831,7 @@ static void register_types(void)register_char_driver_qapi ("null" ,CHARDEV_BACKEND_KIND_NULL ,NULL );register_char_driver ("socket" , qemu_chr_open_socket);register_char_driver ("udp" , qemu_chr_open_udp);
Quoted 8 lines
qemu-char.c static void register_types(void) · line 3837
Quoted 6 lines
qemu-char.c +1
-1-register_char_driver_qapi ("memory" ,CHARDEV_BACKEND_KIND_MEMORY , +register_char_driver_qapi ("ringbuf" ,CHARDEV_BACKEND_KIND_RINGBUF , qemu_chr_parse_ringbuf);register_char_driver_qapi ("file" ,CHARDEV_BACKEND_KIND_FILE , qemu_chr_parse_file_out);Same here as for patch 1.
Oh, actually this is different. The only inconsistency is in the name of the type, the enum is consistent with the -chardev option and it cannot be renamed because it was in QEMU 1.4.
So we can change the type, but we can do that post 1.5.
Paolo
Re: [Qemu-devel] [for 1.5? Qemu-devel] [PATCH 2/3] chardev: Make the name of ringbuf device consistent
Quoted 14 lines · Paolo Bonzini
Il 20/05/2013 12:43, Paolo Bonzini ha scritto:
Quoted 13 lines
Il 20/05/2013 08:51, Lei Li ha scritto:
Quoted 12 lines
Now we have ringbuf char device, but the backend name of it is a little confusion. We actually register it by 'memory', but the description in qemu-option, the name of open functions and the new api backend called it 'ringbuf'. It should keep consistent. This patch named it all to 'ringbuf'.
Signed-off-by Lei Li <[email protected]>--- qapi-schema.json | 2 +- qemu-char.c | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-)
Quoted 10 lines
Quoted 10 lines
qapi-schema.json line 3324
Quoted 10 lines
qapi-schema.json +1
-1@@ -3321,7 +3321,7 @@ 'spicevmc' : 'ChardevSpiceChannel', 'spiceport' : 'ChardevSpicePort', 'vc' : 'ChardevVC', - 'memory' : 'ChardevRingbuf' } } + 'ringbuf': 'ChardevRingbuf' } }
This would be an ABI-visible change.
Quoted 5 lines
Oh, actually this is different. The only inconsistency is in the name of the type, the enum is consistent with the -chardev option and it cannot be renamed because it was in QEMU 1.4.
So we can change the type, but we can do that post 1.5.
Careful. While the union existed in 1.4, it had fewer elements; the 'memory' element was added in commit 1da48c65, which means it has never been released yet. If you want to avoid an ABI change, then this commit must go in NOW.
This also reiterates the question of how libvirt can know which members of a union are present, since we have added members to the union that were not available in 1.4 but still don't have a way to introspect which chardevs can be added.
Signature · 2 lines
Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
Re: [Qemu-devel] [for 1.5? Qemu-devel] [PATCH 2/3] chardev: Make the name of ringbuf device consistent
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Il 20/05/2013 17:05, Eric Blake ha scritto:
Quoted 25 lines · Paolo Bonzini
Quoted 14 lines
Il 20/05/2013 12:43, Paolo Bonzini ha scritto:
Quoted 13 lines
Il 20/05/2013 08:51, Lei Li ha scritto:
Quoted 12 lines
Now we have ringbuf char device, but the backend name of it is a little confusion. We actually register it by 'memory', but the description in qemu-option, the name of open functions and the new api backend called it 'ringbuf'. It should keep consistent. This patch named it all to 'ringbuf'.
Signed-off-by Lei Li <[email protected]> ---qapi-schema.json | 2 +-
qemu-char.c| 12
++++++------ 2 files changed, 7 insertions(+), 7 deletions(-)Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
qapi-schema.json index renamed from qapi-schema.json +0
-09302e7d..61f6b34 100644 ---
a/qapi-schema.json+++b/qapi-schema.json@@ -3321,7 +3321,7 @@ 'spicevmc' :
'ChardevSpiceChannel', 'spiceport' : 'ChardevSpicePort', 'vc' : 'ChardevVC', -
'memory' : 'ChardevRingbuf' } } +
'ringbuf': 'ChardevRingbuf' } }This would be an ABI-visible change.
Quoted 7 lines
Quoted 5 lines
Oh, actually this is different. The only inconsistency is in the name of the type, the enum is consistent with the -chardev option and it cannot be renamed because it was in QEMU 1.4.
So we can change the type, but we can do that post 1.5.
Careful. While the union existed in 1.4
Sorry, I was referring to "-chardev memory", which exists in 1.4 and cannot be renamed (which this patch does).
Quoted 3 lines
, it had fewer elements; the 'memory' element was added in commit
1da48c65, which means it has never been released yet. If you want to avoid an ABI change, then this commit must go in NOW.
We should not change the enum, only the name of the struct (and the other way round: from ChardevRingbuf to ChardevMemory). The enum and
- -chardev backend should be as consistent as possible.
Quoted 4 lines
This also reiterates the question of how libvirt can know which members of a union are present, since we have added members to the union that were not available in 1.4 but still don't have a way to introspect which chardevs can be added.
Libvirt doesn't use most of the chardev types. IIRC
those that are supported were all in 1.4 (pty, sockets).
Paolo
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iQIcBAEBAgAGBQJRmj4tAAoJEBvWZb6bTYbyYqsP/jnBxMBMu/hk0JeDLB/WdCBy 5WLrDwMItBn7tfK4wFNqzMKgN+iWHKTKdDaspvQ6z/RaCKYO6hCtF67oe8jpE9/f xogDYIyG4BOZTnRoI7Il5X/cyUtKduP/zvBaSoBjSCPw91oZYegQam3iYXJJxDrL eiuRrVL14FOmy60xpqxCItC+0f4R7sff37PWCMAfMhOVzY4+I5r0nmLcjJpRznxX PIoEGtArw3qE3SMD9gU0p7hFIKnpSn/1hOA7UC5ecA2t2OtDRABM2rXJ7q8JAPyE 2jK6OBgUKmHKTlrbu1ecsx+WnHbzHoU8xSAx6ojJVliX2o+A84rRQ8LF1I954++M 2pqRjnYO9pHxNVpLnVZyMssewGnxcNfqSIMn8YZqwax5jvgQIhZDcD3XTa9cfi8r DABzKqx14GUTUYzCFgxEBi8s20oQB2dwNQuefhE/wE5RmjB83qvYWtZqaQqPFGmc JwXUJSK5zRQ9u5wayolPNU2sdEKZfg2Aqfady2scMTncnM3V4nh/rrLC8h0pXbXG VQaxVWmye/fb4vWoRvtq0+Wtltd8GcpFAoVwae56SGD5OSBS5dL574gkv+yht8pd PpTdsYrIIPbl2dTIKMeuBXoTww+tfdLGORMoJcS2JpCWEvYfqAIt1mIfGxrpq14c LvUwTnU1WRdHCqZh3sPU
=9Ari
-----END PGP SIGNATURE-----
Re: [Qemu-devel] [for 1.5? Qemu-devel] [PATCH 2/3] chardev: Make the name of ringbuf device consistent
Quoted 37 lines · Paolo Bonzini
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1Il 20/05/2013 17:05, Eric Blake ha scritto:
Quoted 24 lines · Paolo Bonzini
Quoted 14 lines
Il 20/05/2013 12:43, Paolo Bonzini ha scritto:
Quoted 13 lines
Il 20/05/2013 08:51, Lei Li ha scritto:
Quoted 12 lines
Now we have ringbuf char device, but the backend name of it is a little confusion. We actually register it by 'memory', but the description in qemu-option, the name of open functions and the new api backend called it 'ringbuf'. It should keep consistent. This patch named it all to 'ringbuf'.
Signed-off-by Lei Li <[email protected]> ---qapi-schema.json | 2 +-
qemu-char.c| 12
++++++------ 2 files changed, 7 insertions(+), 7 deletions(-)Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
qapi-schema.json index renamed from qapi-schema.json +0
-09302e7d..61f6b34 100644 ---
a/qapi-schema.json+++b/qapi-schema.json@@ -3321,7 +3321,7 @@ 'spicevmc' :
'ChardevSpiceChannel', 'spiceport' : 'ChardevSpicePort', 'vc' : 'ChardevVC', -
'memory' : 'ChardevRingbuf' } } +
'ringbuf': 'ChardevRingbuf' } }This would be an ABI-visible change.
Quoted 6 lines
Quoted 5 lines
Oh, actually this is different. The only inconsistency is in the name of the type, the enum is consistent with the -chardev option and it cannot be renamed because it was in QEMU 1.4.
So we can change the type, but we can do that post 1.5.
Careful. While the union existed in 1.4
Sorry, I was referring to "-chardev memory", which exists in 1.4 and cannot be renamed (which this patch does).
Quoted 6 lines
Quoted 3 lines
, it had fewer elements; the 'memory' element was added in commit
1da48c65, which means it has never been released yet. If you want to avoid an ABI change, then this commit must go in NOW.We should not change the enum, only the name of the struct (and the other way round: from ChardevRingbuf to ChardevMemory). The enum and
- -chardev backend should be as consistent as possible.
Sure, patches based on this will be send out soon. Thanks!
Quoted 28 lines
Quoted 5 lines
This also reiterates the question of how libvirt can know which members of a union are present, since we have added members to the union that were not available in 1.4 but still don't have a way to introspect which chardevs can be added.
Libvirt doesn't use most of the chardev types. IIRC
those that are supported were all in 1.4 (pty, sockets).Paolo
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/iQIcBAEBAgAGBQJRmj4tAAoJEBvWZb6bTYbyYqsP/jnBxMBMu/hk0JeDLB/WdCBy 5WLrDwMItBn7tfK4wFNqzMKgN+iWHKTKdDaspvQ6z/RaCKYO6hCtF67oe8jpE9/f xogDYIyG4BOZTnRoI7Il5X/cyUtKduP/zvBaSoBjSCPw91oZYegQam3iYXJJxDrL eiuRrVL14FOmy60xpqxCItC+0f4R7sff37PWCMAfMhOVzY4+I5r0nmLcjJpRznxX PIoEGtArw3qE3SMD9gU0p7hFIKnpSn/1hOA7UC5ecA2t2OtDRABM2rXJ7q8JAPyE 2jK6OBgUKmHKTlrbu1ecsx+WnHbzHoU8xSAx6ojJVliX2o+A84rRQ8LF1I954++M 2pqRjnYO9pHxNVpLnVZyMssewGnxcNfqSIMn8YZqwax5jvgQIhZDcD3XTa9cfi8r DABzKqx14GUTUYzCFgxEBi8s20oQB2dwNQuefhE/wE5RmjB83qvYWtZqaQqPFGmc JwXUJSK5zRQ9u5wayolPNU2sdEKZfg2Aqfady2scMTncnM3V4nh/rrLC8h0pXbXG VQaxVWmye/fb4vWoRvtq0+Wtltd8GcpFAoVwae56SGD5OSBS5dL574gkv+yht8pd PpTdsYrIIPbl2dTIKMeuBXoTww+tfdLGORMoJcS2JpCWEvYfqAIt1mIfGxrpq14c LvUwTnU1WRdHCqZh3sPU
=9Ari
-----END PGP SIGNATURE-----
Signature · 1 line
Lei
PATCH 3/3 chardev: Get filename for new qapi backend
In reply to Lei LiThis 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.
--- qemu-char.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
qemu-char.c +2 -0
@@ -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);
Signature · 1 line
1.7.7.6