On Thu, 8 Apr 2010 17:16:35 -0300 Miguel Di Ciurcio Filho <miguel.fi...@gmail.com> wrote:
> Signed-off-by: Miguel Di Ciurcio Filho <miguel.fi...@gmail.com> > --- > net/slirp.c | 7 +++++-- > 1 files changed, 5 insertions(+), 2 deletions(-) > > diff --git a/net/slirp.c b/net/slirp.c > index b41c60a..4036b92 100644 > --- a/net/slirp.c > +++ b/net/slirp.c > @@ -32,6 +32,8 @@ > #include "monitor.h" > #include "sysemu.h" > #include "qemu_socket.h" > +#include "qdict.h" > +#include "qstring.h" > #include "slirp/libslirp.h" > > static int get_str_sep(char *buf, int buf_size, const char **pp, int sep) > @@ -240,8 +242,9 @@ static int net_slirp_init(VLANState *vlan, const char > *model, > > nc = qemu_new_net_client(&net_slirp_info, vlan, NULL, model, name); > > - snprintf(nc->info_str, sizeof(nc->info_str), > - "net=%s, restricted=%c", inet_ntoa(net), restricted ? 'y' : > 'n'); > + nc->info_dict = qdict_new(); > + qdict_put(nc->info_dict, "net", qstring_from_str(inet_ntoa(net))); > + qdict_put(nc->info_dict, "restricted", qstring_from_str( restricted ? > "y" : "n")); Better to use qbool here. > > s = DO_UPCAST(SlirpState, nc, nc); >