On 05/11/18 17:52, Roger Pau Monné wrote:
> On Mon, Nov 05, 2018 at 11:16:40AM +0000, Andrew Cooper wrote:
>> diff --git a/tools/misc/xen-cpuid.c b/tools/misc/xen-cpuid.c
>> index 95ed853..2c41031 100644
>> --- a/tools/misc/xen-cpuid.c
>> +++ b/tools/misc/xen-cpuid.c
>> @@ -3,6 +3,8 @@
>> #include <err.h>
>> #include <getopt.h>
>> #include <string.h>
>> +#include <errno.h>
>> +#include <limits.h>
>>
>> #include <xenctrl.h>
>>
>> @@ -309,11 +311,13 @@ int main(int argc, char **argv)
>> {
>> enum { MODE_UNKNOWN, MODE_INFO, MODE_DETAIL, MODE_INTERPRET,
>> MODE_POLICY }
>> mode = MODE_UNKNOWN;
>> + int domid = -1;
> Would it be better to use DOMID_INVALID instead of -1?
That doesn't exist anywhere consistent or useful to use in this case.
(Also, confusingly, DOMID_INVALID is 0x7ff4 in the public ABI, which is
different to the INVALID_DOMID of ~0/-1 used by various bits of libxc
and libxl)
~Andrew
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel