}
virQEMUBuildBufferEscapeComma(buf, source);
+
+ if (secinfo && secinfo->type == VIR_DOMAIN_SECRET_INFO_TYPE_AES)
+ virBufferAsprintf(buf, ",file.password-secret=%s", secinfo->s.aes.alias);
} else {
if (!(source = virQEMUBuildDriveCommandlineFromJSON(srcprops)))
goto cleanup;
virBufferAsprintf(buf, "file.debug=%d,", cfg->glusterDebugLevel);
}
- if (secinfo && secinfo->type == VIR_DOMAIN_SECRET_INFO_TYPE_AES) {
- /* NB: If libvirt starts using the more modern option based
- * syntax to build the command line (e.g., "-drive driver=rbd,
- * filename=%s,...") instead of the legacy model (e.g."-drive
- * file=%s,..."), then the "file." prefix can be removed
- */
- virBufferAsprintf(buf, "file.password-secret=%s,",
- secinfo->s.aes.alias);
- }
-
if (encinfo)
virQEMUBuildLuksOpts(buf, &disk->src->encryption->encinfo,
encinfo->s.aes.alias);