On Fri, Sep 04, 2020 at 11:35:34AM +0800, Shi Lei wrote: > Signed-off-by: Shi Lei <shi_lei@xxxxxxxxxxxxxx> > --- > src/conf/domain_conf.c | 109 ++++--------------------------- > src/conf/domain_conf.h | 18 ++--- > src/qemu/qemu_command.c | 2 + > src/qemu/qemu_hotplug.c | 1 + > src/qemu/qemu_migration_cookie.c | 1 + > src/qemu/qemu_process.c | 1 + > src/qemu/qemu_validate.c | 1 + > 7 files changed, 27 insertions(+), 106 deletions(-) > > diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c > index d1602ab..507679b 100644 > --- a/src/conf/domain_conf.c > +++ b/src/conf/domain_conf.c > @@ -853,6 +853,7 @@ VIR_ENUM_IMPL(virDomainGraphics, > > VIR_ENUM_IMPL(virDomainGraphicsListen, > VIR_DOMAIN_GRAPHICS_LISTEN_TYPE_LAST, > + "dummy", > "none", > "address", > "network", > diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h > index 6273c40..fc4aae2 100644 > --- a/src/conf/domain_conf.h > +++ b/src/conf/domain_conf.h > @@ -1653,7 +1653,8 @@ typedef enum { > } virDomainGraphicsSpiceStreamingMode; > > typedef enum { > - VIR_DOMAIN_GRAPHICS_LISTEN_TYPE_NONE = 0, > + VIR_DOMAIN_GRAPHICS_LISTEN_TYPE_DUMMY = 0, > + VIR_DOMAIN_GRAPHICS_LISTEN_TYPE_NONE, Hmm, another case of adding a dummy enum value. I think we really need to avoid these additions. > VIR_DOMAIN_GRAPHICS_LISTEN_TYPE_ADDRESS, > VIR_DOMAIN_GRAPHICS_LISTEN_TYPE_NETWORK, > VIR_DOMAIN_GRAPHICS_LISTEN_TYPE_SOCKET, > @@ -1667,13 +1668,14 @@ typedef enum { > VIR_DOMAIN_HUB_TYPE_LAST > } virDomainHubType; > > -struct _virDomainGraphicsListenDef { > - virDomainGraphicsListenType type; > - char *address; > - char *network; > - char *socket; > - bool fromConfig; /* true if the @address is config file originated */ > - bool autoGenerated; > +struct _virDomainGraphicsListenDef { /* genparse:withhook */ > + virDomainGraphicsListenType type; /* xmlattr */ > + char *address; /* xmlattr */ > + char *network; /* xmlattr */ > + char *socket; /* xmlattr */ > + /* true if the @address is config file originated */ > + int fromConfig; /* xmlattr */ > + bool autoGenerated; /* xmlattr */ > }; Regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|