mirror of
https://github.com/mii443/qemu.git
synced 2025-12-03 11:08:25 +00:00
net: Move NetClientState.info_str to dynamic allocations
The info_str field of the NetClientState structure is static and has a size of 256 bytes. This amount is often unclaimed, and the field itself is used exclusively for HMP "info network". The patch translates info_str to dynamic memory allocation. This action is also allows us to painlessly discard usage of this field for backend devices. Signed-off-by: Alexey Kirillov <lekiravi@yandex-team.ru> Signed-off-by: Jason Wang <jasowang@redhat.com>
This commit is contained in:
committed by
Jason Wang
parent
3c3b656885
commit
59b5437eb7
@@ -730,8 +730,7 @@ int net_init_l2tpv3(const Netdev *netdev,
|
||||
QAPI_CLONE_MEMBERS(NetdevL2TPv3Options,
|
||||
&nc->stored_config->u.l2tpv3, l2tpv3);
|
||||
|
||||
snprintf(s->nc.info_str, sizeof(s->nc.info_str),
|
||||
"l2tpv3: connected");
|
||||
s->nc.info_str = g_strdup_printf("l2tpv3: connected");
|
||||
return 0;
|
||||
outerr:
|
||||
qemu_del_net_client(nc);
|
||||
|
||||
Reference in New Issue
Block a user