Re: [PATCH v4 4/7] storage: Add support to create a luks volume

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




[...]

>> +
>> +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

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]