[libvirt] [PATCH v2 09/12] Add host cache information into capabilities

Martin Kletzander mkletzan at redhat.com
Thu Apr 6 09:10:10 UTC 2017


On Thu, Apr 06, 2017 at 02:04:04PM +0800, Eli Qiao wrote:
>
>> +
>> +VIR_ENUM_IMPL(virCache, VIR_CACHE_TYPE_LAST,
>> + "unified",
>> + "instruction",
>> + "data")
>> +
>
>
>> };
>>
>> +typedef enum {
>> + VIR_CACHE_TYPE_DATA,
>> + VIR_CACHE_TYPE_INSTRUCTION,
>> + VIR_CACHE_TYPE_UNIFIED,
>> +
>> + VIR_CACHE_TYPE_LAST
>> +} virCacheType;
>> +
>
>The sequence is wrong, it should be :
>
>VIR_CACHE_TYPE_UNIFIED,
>VIR_CACHE_TYPE_INSTRUCTION,
>VIR_CACHE_TYPE_DATA,
>

Hehe, good catch.  Since the internal values are not exposed anywhere,
the test data aren't affected.  I wish I remembered why I changed that.

For future reviewers, consider the following squashed in:

diff --git i/src/conf/capabilities.h w/src/conf/capabilities.h
index e099cccf6d39..60c8218ce3e5 100644
--- i/src/conf/capabilities.h
+++ w/src/conf/capabilities.h
@@ -139,9 +139,9 @@ struct _virCapsHostSecModel {
 };

 typedef enum {
-    VIR_CACHE_TYPE_DATA,
-    VIR_CACHE_TYPE_INSTRUCTION,
     VIR_CACHE_TYPE_UNIFIED,
+    VIR_CACHE_TYPE_INSTRUCTION,
+    VIR_CACHE_TYPE_DATA,

     VIR_CACHE_TYPE_LAST
 } virCacheType;
--

Martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20170406/83008212/attachment-0001.sig>


More information about the libvir-list mailing list