Re: [PATCH] storage: minor fix in luks encrypted volume creation

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

 



On Wed, 2018-06-06 at 17:30 +0200, Ján Tomko wrote:
[...]
> > +    if (!enc->secrets) {
> 
> You can use enc->secrets != 1, to match the error message.
> 
> But the > 1 cause will be caught anyway later in
> storageBackendCreateQemuImgCheckEncryption which cannot be simply called
> before here because the code is overly complicated.

I'd rather the check be here, where we raise the error message,
instead of relying on the fact that the other function will never
change in a way that will cause it not to check for >1.

-- 
Andrea Bolognani / Red Hat / Virtualization

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

  Powered by Linux