#define FORMAT_PROLOGUE(item) \
do { \
+ if (item->supported == VIR_TRISTATE_BOOL_ABSENT) \
+ return; \
virBufferAsprintf(buf, "<" #item " supported='%s'%s\n", \
(item->supported == VIR_TRISTATE_BOOL_YES) ? "yes" : "no", \
(item->supported == VIR_TRISTATE_BOOL_YES) ? ">" : "/>"); \
- if (item->supported != VIR_TRISTATE_BOOL_YES) \
+ if (item->supported == VIR_TRISTATE_BOOL_NO) \
return; \
virBufferAdjustIndent(buf, 2); \
} while (0)
#define FORMAT_SINGLE(name, supported) \
do { \
- virBufferAsprintf(&buf, "<%s supported='%s'/>\n", name, \
- (supported == VIR_TRISTATE_BOOL_YES) ? "yes" : "no"); \
+ if (supported != VIR_TRISTATE_BOOL_ABSENT) { \
+ virBufferAsprintf(&buf, "<%s supported='%s'/>\n", name, \
+ (supported == VIR_TRISTATE_BOOL_YES) ? "yes" : "no"); \
+ } \
} while (0)
#define ENUM_PROCESS(master, capsEnum, valToStr) \
<domain>kvm</domain>
<machine>my-machine-type</machine>
<arch>x86_64</arch>
- <iothreads supported='no'/>
- <os supported='no'/>
<cpu>
<mode name='host-passthrough' supported='no'/>
<mode name='host-model' supported='no'/>
<mode name='custom' supported='no'/>
</cpu>
<devices>
- <disk supported='no'/>
- <graphics supported='no'/>
- <video supported='no'/>
- <hostdev supported='no'/>
</devices>
<features>
- <gic supported='no'/>
- <vmcoreinfo supported='no'/>
- <genid supported='no'/>
<sev supported='no'/>
</features>
</domainCapabilities>