goto error;
if (virAsprintf(&cfg->snapshotDir, "%s/snapshot", cfg->libDir) < 0)
goto error;
+ if (virAsprintf(&cfg->checkpointDir, "%s/checkpoint", cfg->libDir) < 0)
+ goto error;
if (virAsprintf(&cfg->autoDumpPath, "%s/dump", cfg->libDir) < 0)
goto error;
if (virAsprintf(&cfg->channelTargetDir,
goto error;
if (virAsprintf(&cfg->snapshotDir, "%s/qemu/snapshot", cfg->configBaseDir) < 0)
goto error;
+ if (virAsprintf(&cfg->checkpointDir, "%s/qemu/checkpoint", cfg->configBaseDir) < 0)
+ goto error;
if (virAsprintf(&cfg->autoDumpPath, "%s/qemu/dump", cfg->configBaseDir) < 0)
goto error;
if (virAsprintf(&cfg->channelTargetDir,
VIR_FREE(cfg->cacheDir);
VIR_FREE(cfg->saveDir);
VIR_FREE(cfg->snapshotDir);
+ VIR_FREE(cfg->checkpointDir);
VIR_FREE(cfg->channelTargetDir);
VIR_FREE(cfg->nvramDir);
#include "capabilities.h"
#include "network_conf.h"
#include "domain_conf.h"
+#include "checkpoint_conf.h"
#include "snapshot_conf.h"
#include "domain_event.h"
#include "virthread.h"
char *cacheDir;
char *saveDir;
char *snapshotDir;
+ char *checkpointDir;
char *channelTargetDir;
char *nvramDir;
char *swtpmStorageDir;
cfg->snapshotDir);
goto error;
}
+ if (virFileMakePath(cfg->checkpointDir) < 0) {
+ virReportSystemError(errno, _("Failed to create checkpoint dir %s"),
+ cfg->checkpointDir);
+ goto error;
+ }
if (virFileMakePath(cfg->autoDumpPath) < 0) {
virReportSystemError(errno, _("Failed to create dump dir %s"),
cfg->autoDumpPath);
(int)cfg->group);
goto error;
}
+ if (chown(cfg->checkpointDir, cfg->user, cfg->group) < 0) {
+ virReportSystemError(errno,
+ _("unable to set ownership of '%s' to %d:%d"),
+ cfg->checkpointDir, (int)cfg->user,
+ (int)cfg->group);
+ goto error;
+ }
if (chown(cfg->autoDumpPath, cfg->user, cfg->group) < 0) {
virReportSystemError(errno,
_("unable to set ownership of '%s' to %d:%d"),