}
-int
-qemuBlockSnapshotAddLegacy(virJSONValue *actions,
- virDomainDiskDef *disk,
- virStorageSource *newsrc,
- bool reuse)
-{
- const char *format = virStorageFileFormatTypeToString(newsrc->format);
- g_autofree char *device = NULL;
- g_autofree char *source = NULL;
-
- if (!(device = qemuAliasDiskDriveFromDisk(disk)))
- return -1;
-
- if (qemuGetDriveSourceString(newsrc, NULL, &source) < 0)
- return -1;
-
- return qemuMonitorTransactionSnapshotLegacy(actions, device, source, format, reuse);
-}
-
-
int
qemuBlockSnapshotAddBlockdev(virJSONValue *actions,
virDomainDiskDef *disk,
G_DEFINE_AUTOPTR_CLEANUP_FUNC(qemuBlockStorageSourceChainData,
qemuBlockStorageSourceChainDataFree);
-int
-qemuBlockSnapshotAddLegacy(virJSONValue *actions,
- virDomainDiskDef *disk,
- virStorageSource *newsrc,
- bool reuse);
-
int
qemuBlockSnapshotAddBlockdev(virJSONValue *actions,
virDomainDiskDef *disk,
}
-int
-qemuMonitorTransactionSnapshotLegacy(virJSONValue *actions,
- const char *device,
- const char *path,
- const char *format,
- bool existing)
-{
- return qemuMonitorJSONTransactionSnapshotLegacy(actions, device, path,
- format, existing);
-}
-
-
int
qemuMonitorTransactionSnapshotBlockdev(virJSONValue *actions,
const char *node,
const char *sourcebitmap);
int
-qemuMonitorTransactionSnapshotLegacy(virJSONValue *actions,
- const char *device,
- const char *path,
- const char *format,
- bool existing);
-int
qemuMonitorTransactionSnapshotBlockdev(virJSONValue *actions,
const char *node,
const char *overlay);
}
-int
-qemuMonitorJSONTransactionSnapshotLegacy(virJSONValue *actions,
- const char *device,
- const char *path,
- const char *format,
- bool existing)
-{
- const char *mode = NULL;
-
- if (existing)
- mode = "existing";
-
- return qemuMonitorJSONTransactionAdd(actions,
- "blockdev-snapshot-sync",
- "s:device", device,
- "s:snapshot-file", path,
- "s:format", format,
- "S:mode", mode,
- NULL);
-}
-
-
int
qemuMonitorJSONTransactionSnapshotBlockdev(virJSONValue *actions,
const char *node,
const char *sourcebitmap);
int
-qemuMonitorJSONTransactionSnapshotLegacy(virJSONValue *actions,
- const char *device,
- const char *path,
- const char *format,
- bool existing);
-int
qemuMonitorJSONTransactionSnapshotBlockdev(virJSONValue *actions,
const char *node,
const char *overlay);
qemuMonitorTransactionBitmapEnable(actions, "node3", "bitmap3") < 0 ||
qemuMonitorTransactionBitmapDisable(actions, "node4", "bitmap4") < 0 ||
qemuMonitorTransactionBitmapMerge(actions, "node5", "bitmap5", &mergebitmaps) < 0 ||
- qemuMonitorTransactionSnapshotLegacy(actions, "dev6", "path", "qcow2", true) < 0 ||
qemuMonitorTransactionSnapshotBlockdev(actions, "node7", "overlay7") < 0 ||
qemuMonitorTransactionBackup(actions, "dev8", "job8", "target8", "bitmap8",
QEMU_MONITOR_TRANSACTION_BACKUP_SYNC_MODE_NONE) < 0 ||