Re: [PATCH 2/2] qemu: Validate TPM TIS device

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

 



On 2/11/21 3:37 AM, Andrea Bolognani wrote:
On Wed, 2021-02-10 at 10:34 -0700, Jim Fehlig wrote:
I aslo worry about future architectures gaining support
for emulated TPM TIS devices.

It's okay to be conservative - we can always relax the check later.

+        if (!ARCH_IS_X86(def->os.arch) && (def->os.arch != VIR_ARCH_AARCH64)) {
+            virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
+                           _("TPM model %s is only available for "
+                             "x86 and aarch64 guests"),

Please don't split the error message into two separate lines

I'm surprised that slipped through my copy and paste since I've always preferred errors on one line for easy searching. We have a lot of split error messages throughout the code. This file is particularly bad. Is there any desire to fix existing cases, or just avoid new ones?

and sprinkle some quotes around '%s' while you're at it.

Will do.

https://libvirt.org/coding-style.html#error-message-format

The entire page is worth a re-read on occasion :-)

Regards,
Jim




[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