oldnode = ctxt->node;
ctxt->node = config;
- obj->def = virDomainDefParseXML(conn, caps, ctxt, 0);
+ obj->def = virDomainDefParseXML(conn, caps, ctxt,
+ VIR_DOMAIN_XML_INTERNAL_STATUS);
ctxt->node = oldnode;
if (!obj->def)
goto error;
const char *statusDir,
virDomainObjPtr obj)
{
+ int flags = VIR_DOMAIN_XML_SECURE|VIR_DOMAIN_XML_INTERNAL_STATUS;
int ret = -1;
char *xml;
- if (!(xml = virDomainObjFormat(conn,
- obj,
- VIR_DOMAIN_XML_SECURE)))
+ if (!(xml = virDomainObjFormat(conn, obj, flags)))
goto cleanup;
if (virDomainSaveXML(conn, statusDir, obj->def, xml))
#include "util.h"
#include "threads.h"
+/* Private component of virDomainXMLFlags */
+typedef enum {
+ VIR_DOMAIN_XML_INTERNAL_STATUS = (1<<16), /* dump internal domain status information */
+} virDomainXMLInternalFlags;
+
/* Different types of hypervisor */
/* NB: Keep in sync with virDomainVirtTypeToString impl */
enum virDomainVirtType {
goto error;
}
+ flags &= VIR_DOMAIN_XML_FLAGS_MASK;
+
if (conn->driver->domainDumpXML) {
char *ret;
ret = conn->driver->domainDumpXML (domain, flags);
#include "internal.h"
+/* bits 16 and above of virDomainXMLFlags are for internal use */
+#define VIR_DOMAIN_XML_FLAGS_MASK 0xffff
#ifdef WITH_LIBVIRTD
int virStateInitialize(int privileged);