提交 f6aa977f 编写于 作者: J John Ferlan

storage: Remove secretPath from _virStorageBackendQemuImgInfo

There's really no need for it to be there since it's only ever
used inside virStorageBackendCreateQemuImgCmdFromVol
Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
ACKed-by: NMichal Privoznik <mprivozn@redhat.com>
上级 e7d9a8f1
...@@ -716,7 +716,6 @@ struct _virStorageBackendQemuImgInfo { ...@@ -716,7 +716,6 @@ struct _virStorageBackendQemuImgInfo {
int inputFormat; int inputFormat;
char *secretAlias; char *secretAlias;
const char *secretPath;
}; };
...@@ -1088,7 +1087,6 @@ virStorageBackendCreateQemuImgCmdFromVol(virStoragePoolObjPtr pool, ...@@ -1088,7 +1087,6 @@ virStorageBackendCreateQemuImgCmdFromVol(virStoragePoolObjPtr pool,
.compat = vol->target.compat, .compat = vol->target.compat,
.features = vol->target.features, .features = vol->target.features,
.nocow = vol->target.nocow, .nocow = vol->target.nocow,
.secretPath = secretPath,
.secretAlias = NULL, .secretAlias = NULL,
}; };
virStorageEncryptionPtr enc = vol->target.encryption; virStorageEncryptionPtr enc = vol->target.encryption;
...@@ -1131,14 +1129,14 @@ virStorageBackendCreateQemuImgCmdFromVol(virStoragePoolObjPtr pool, ...@@ -1131,14 +1129,14 @@ virStorageBackendCreateQemuImgCmdFromVol(virStoragePoolObjPtr pool,
virCommandAddArgList(cmd, "-b", info.backingPath, NULL); virCommandAddArgList(cmd, "-b", info.backingPath, NULL);
if (enc) { if (enc) {
if (!info.secretPath) { if (!secretPath) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s", virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("path to secret data file is required")); _("path to secret data file is required"));
goto error; goto error;
} }
if (virAsprintf(&info.secretAlias, "%s_encrypt0", vol->name) < 0) if (virAsprintf(&info.secretAlias, "%s_encrypt0", vol->name) < 0)
goto error; goto error;
if (storageBackendCreateQemuImgSecretObject(cmd, info.secretPath, if (storageBackendCreateQemuImgSecretObject(cmd, secretPath,
info.secretAlias) < 0) info.secretAlias) < 0)
goto error; goto error;
encinfo = &enc->encinfo; encinfo = &enc->encinfo;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册