}
-/*
- * qemuTPMCreateEmulatorStorage
- *
+/**
+ * qemuTPMEmulatorCreateStorage:
* @storagepath: directory for swtpm's persistent state
* @created: a pointer to a bool that will be set to true if the
* storage was created because it did not exist yet
* Adapt ownership of the directory and all swtpm's state files there.
*/
static int
-qemuTPMCreateEmulatorStorage(const char *storagepath,
+qemuTPMEmulatorCreateStorage(const char *storagepath,
bool *created,
uid_t swtpm_user,
gid_t swtpm_group)
static void
-qemuTPMDeleteEmulatorStorage(virDomainTPMDef *tpm)
+qemuTPMEmulatorDeleteStorage(virDomainTPMDef *tpm)
{
g_autofree char *path = g_path_get_dirname(tpm->data.emulator.storagepath);
if (!swtpm)
return NULL;
- if (qemuTPMCreateEmulatorStorage(tpm->data.emulator.storagepath,
+ if (qemuTPMEmulatorCreateStorage(tpm->data.emulator.storagepath,
&created, swtpm_user, swtpm_group) < 0)
return NULL;
error:
if (created)
- qemuTPMDeleteEmulatorStorage(tpm);
+ qemuTPMEmulatorDeleteStorage(tpm);
return NULL;
}
continue;
if (!def->tpms[i]->data.emulator.persistent_state)
- qemuTPMDeleteEmulatorStorage(def->tpms[i]);
+ qemuTPMEmulatorDeleteStorage(def->tpms[i]);
}
}