[...]
> +
> +void
> +virQEMUBuildLuksOpts(virBufferPtr buf,
> + virStorageEncryptionInfoDefPtr enc,
> + const char *alias)
> +{
> + virBufferAsprintf(buf, "key-secret=%s,", alias);
> +
> + /* If there's any cipher, then add that to the command line */
> + if (enc->cipher_name) {
> + virBufferEscapeString(buf, "cipher-alg=%s-",
enc->cipher_name);
> + virBufferAsprintf(buf, "%u,", enc->cipher_size);
> + if (enc->cipher_mode)
> + virBufferEscapeString(buf, "cipher-mode=%s,",
> enc->cipher_mode);
> + if (enc->cipher_hash)
> + virBufferEscapeString(buf, "hash-alg=%s,",
> enc->cipher_hash);
> + if (enc->ivgen_name)
> + virBufferEscapeString(buf, "ivgen-alg=%s,",
> enc->ivgen_name);
> + if (enc->ivgen_hash)
> + virBufferEscapeString(buf, "ivgen-hash-alg=%s,",
> enc->ivgen_hash);
s/virBufferEscapeString/qemuBufferEscapeComma/
Not sure I understand what this is referencing.... Besides
qemuBufferEscapeComma is static to qemu_command
John
This is QEMU command line, not XML. Also, both of the functions are
no-ops if the string is NULL, so the ifs are not necessary.
ACK with that fixed and the unused 'str' variable removed.
Jan