Re: [PATCH v4 06/11] conf: Add support for profile parameter on TPM emulator in domain XML

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

 





On 11/15/24 4:19 AM, Michal Prívozník wrote:
On 11/13/24 18:39, Stefan Berger wrote:


+        }
          break;
      case VIR_DOMAIN_TPM_TYPE_EXTERNAL:
          if (def->data.external.source->type == VIR_DOMAIN_CHR_TYPE_UNIX) {
diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h
index e1103c3655..bd2740af26 100644
--- a/src/conf/domain_conf.h
+++ b/src/conf/domain_conf.h
@@ -1492,6 +1492,8 @@ struct _virDomainTPMEmulatorDef {
      bool hassecretuuid;
      bool persistent_state;
      virBitmap *activePcrBanks;
+    char *profile_source; /* 'source' profile was created from */
+    const char *profile_remove_disabled;

Why not store the enum instead of this const string?

Oh, and while at it, these two (soon three) variables can be moved into
a separate struct so that their "profile_" prefix can be dropped. E.g.

struct {
   char *source;
   virDomainTPMProfileRemoveDisabled removeDisabled;
} profile;

Yes, all profile-related stuff together is better.

Thanks.
    Stefan




[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