On Thu, May 05, 2016 at 18:20:20 +0200, Pavel Hrdina wrote:
Signed-off-by: Pavel Hrdina <phrdina(a)redhat.com>
---
src/conf/domain_conf.c | 2 ++
src/conf/domain_conf.h | 14 +++++++-------
src/libxl/libxl_conf.c | 8 ++++++++
src/qemu/qemu_command.c | 14 +++++++++++++-
4 files changed, 30 insertions(+), 8 deletions(-)
diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h
index b7b099c..b825477 100644
--- a/src/conf/domain_conf.h
+++ b/src/conf/domain_conf.h
@@ -1552,7 +1552,7 @@ typedef enum {
typedef struct _virDomainGraphicsListenDef virDomainGraphicsListenDef;
typedef virDomainGraphicsListenDef *virDomainGraphicsListenDefPtr;
struct _virDomainGraphicsListenDef {
- int type; /* enum virDomainGraphicsListenType */
+ virDomainGraphicsListenType type;
Same as below. Assigned in virDomainGraphicsListenDefParseXML.
char *address;
char *network;
bool fromConfig; /* true if the @address is config file originated */
@@ -1564,7 +1564,7 @@ struct _virDomainGraphicsDef {
* Value 0 means port wasn't specified in XML at all.
* Positive value is actual port number given in XML.
*/
- int type;
+ virDomainGraphicsType type;
In virDomainGraphicsDefParseXML this struct member is directly assigned
without a temp variable so virDomainGraphicsTypeFromString won't be
able to return error as enum types are unsigned .
union {
struct {
int port;
ACK with a temp variable added.
Peter