diff options
Diffstat (limited to 'tools/libxl/libxl_utils.c')
-rw-r--r-- | tools/libxl/libxl_utils.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/libxl/libxl_utils.c b/tools/libxl/libxl_utils.c index 227364cffe..a5b3c17f55 100644 --- a/tools/libxl/libxl_utils.c +++ b/tools/libxl/libxl_utils.c @@ -507,6 +507,13 @@ void libxl_cputopology_list_free(libxl_cputopology *list, int nr) free(list); } +int libxl_domid_valid_guest(uint32_t domid) +{ + /* returns 1 if the value _could_ be a valid guest domid, 0 otherwise + * does not check whether the domain actually exists */ + return domid > 0 && domid < DOMID_FIRST_RESERVED; +} + /* * Local variables: * mode: C |