Patchwork [3/8] net: Introduce VLANClientState->info_dict

login
register
mail settings
Submitter Miguel Di Ciurcio Filho
Date June 10, 2010, 9:37 p.m.
Message ID <1276205825-1922-4-git-send-email-miguel.filho@gmail.com>
Download mbox | patch
Permalink /patch/55267/
State New
Headers show

Comments

Miguel Di Ciurcio Filho - June 10, 2010, 9:37 p.m.
There is no standard format when formatting VLANClientState.info_str,
so it is difficult to extract information and transmit it over QMP.

This patch adds info_dict, a QDict to better handle this information.

Signed-off-by: Miguel Di Ciurcio Filho <miguel.filho@gmail.com>
---
 net.h |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
Luiz Capitulino - June 16, 2010, 5:40 p.m.
On Thu, 10 Jun 2010 18:37:00 -0300
Miguel Di Ciurcio Filho <miguel.filho@gmail.com> wrote:

> There is no standard format when formatting VLANClientState.info_str,
> so it is difficult to extract information and transmit it over QMP.
> 
> This patch adds info_dict, a QDict to better handle this information.
> 
> Signed-off-by: Miguel Di Ciurcio Filho <miguel.filho@gmail.com>
> ---
>  net.h |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
> 
> diff --git a/net.h b/net.h
> index b83f615..acc1645 100644
> --- a/net.h
> +++ b/net.h
> @@ -66,6 +66,7 @@ struct VLANClientState {
>      char *model;
>      char *name;
>      char info_str[256];
> +    QDict *info_dict;
>      unsigned receive_disabled : 1;
>  };
>  

 You need to free it, you had a patch for that.

Patch

diff --git a/net.h b/net.h
index b83f615..acc1645 100644
--- a/net.h
+++ b/net.h
@@ -66,6 +66,7 @@  struct VLANClientState {
     char *model;
     char *name;
     char info_str[256];
+    QDict *info_dict;
     unsigned receive_disabled : 1;
 };