if ((n = virXPathNodeSet("./disks/*", ctxt, &nodes)) < 0)
goto cleanup;
- if (flags & VIR_DOMAIN_SNAPSHOT_PARSE_DISKS) {
- if (n)
- def->disks = g_new0(virDomainSnapshotDiskDef, n);
- def->ndisks = n;
- for (i = 0; i < def->ndisks; i++) {
- if (virDomainSnapshotDiskDefParseXML(nodes[i], ctxt, &def->disks[i],
- flags, xmlopt) < 0)
- goto cleanup;
- }
- VIR_FREE(nodes);
- } else if (n) {
- virReportError(VIR_ERR_ARGUMENT_UNSUPPORTED, "%s",
- _("unable to handle disk requests in snapshot"));
- goto cleanup;
+ if (n)
+ def->disks = g_new0(virDomainSnapshotDiskDef, n);
+ def->ndisks = n;
+ for (i = 0; i < def->ndisks; i++) {
+ if (virDomainSnapshotDiskDefParseXML(nodes[i], ctxt, &def->disks[i],
+ flags, xmlopt) < 0)
+ goto cleanup;
}
+ VIR_FREE(nodes);
if (flags & VIR_DOMAIN_SNAPSHOT_PARSE_INTERNAL) {
if (!current) {
typedef enum {
VIR_DOMAIN_SNAPSHOT_PARSE_REDEFINE = 1 << 0,
- VIR_DOMAIN_SNAPSHOT_PARSE_DISKS = 1 << 1,
- VIR_DOMAIN_SNAPSHOT_PARSE_INTERNAL = 1 << 2,
- VIR_DOMAIN_SNAPSHOT_PARSE_OFFLINE = 1 << 3,
- VIR_DOMAIN_SNAPSHOT_PARSE_VALIDATE = 1 << 4,
+ VIR_DOMAIN_SNAPSHOT_PARSE_INTERNAL = 1 << 1,
+ VIR_DOMAIN_SNAPSHOT_PARSE_OFFLINE = 1 << 2,
+ VIR_DOMAIN_SNAPSHOT_PARSE_VALIDATE = 1 << 3,
} virDomainSnapshotParseFlags;
typedef enum {
virDomainMomentObj *current = NULL;
bool cur;
unsigned int flags = (VIR_DOMAIN_SNAPSHOT_PARSE_REDEFINE |
- VIR_DOMAIN_SNAPSHOT_PARSE_DISKS |
VIR_DOMAIN_SNAPSHOT_PARSE_INTERNAL);
int ret = -1;
int direrr;
unsigned int flags)
{
qemuDomainObjPrivate *priv = vm->privateData;
- unsigned int parse_flags = VIR_DOMAIN_SNAPSHOT_PARSE_DISKS;
+ unsigned int parse_flags = 0;
if (flags & VIR_DOMAIN_SNAPSHOT_CREATE_REDEFINE)
parse_flags |= VIR_DOMAIN_SNAPSHOT_PARSE_REDEFINE;
privconn->xmlopt,
NULL,
&cur,
- VIR_DOMAIN_SNAPSHOT_PARSE_DISKS |
VIR_DOMAIN_SNAPSHOT_PARSE_INTERNAL |
VIR_DOMAIN_SNAPSHOT_PARSE_REDEFINE);
if (!def)
virObjectEvent *event = NULL;
bool update_current = true;
bool redefine = flags & VIR_DOMAIN_SNAPSHOT_CREATE_REDEFINE;
- unsigned int parse_flags = VIR_DOMAIN_SNAPSHOT_PARSE_DISKS;
+ unsigned int parse_flags = 0;
g_autoptr(virDomainSnapshotDef) def = NULL;
/*
nsresult rc;
resultCodeUnion result;
virDomainSnapshotPtr ret = NULL;
- unsigned int parse_flags = (VIR_DOMAIN_SNAPSHOT_PARSE_DISKS |
- VIR_DOMAIN_SNAPSHOT_PARSE_REDEFINE);
+ unsigned int parse_flags = VIR_DOMAIN_SNAPSHOT_PARSE_REDEFINE;
g_autoptr(virDomainSnapshotDef) def = NULL;
if (!data->vboxObj)
}
def = virDomainSnapshotDefParseString(defXml,
data->xmlopt, NULL, NULL,
- VIR_DOMAIN_SNAPSHOT_PARSE_DISKS |
VIR_DOMAIN_SNAPSHOT_PARSE_REDEFINE);
if (!def) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
virDomainObj *dom;
struct _vzConn *privconn = domain->conn->privateData;
struct _vzDriver *driver = privconn->driver;
- unsigned int parse_flags = VIR_DOMAIN_SNAPSHOT_PARSE_DISKS;
+ unsigned int parse_flags = 0;
virDomainSnapshotObjList *snapshots = NULL;
virDomainMomentObj *current;
bool job = false;
g_autofree char *inXmlData = NULL;
g_autofree char *outXmlData = NULL;
g_autofree char *actual = NULL;
- unsigned int parseflags = VIR_DOMAIN_SNAPSHOT_PARSE_DISKS;
+ unsigned int parseflags = 0;
unsigned int formatflags = VIR_DOMAIN_SNAPSHOT_FORMAT_SECURE;
bool cur = false;
g_autoptr(virDomainSnapshotDef) def = NULL;