diff options
author | Matthew Fioravante <matthew.fioravante@jhuapl.edu> | 2012-10-05 14:34:27 +0100 |
---|---|---|
committer | Matthew Fioravante <matthew.fioravante@jhuapl.edu> | 2012-10-05 14:34:27 +0100 |
commit | fb0ddeafbc3334a5d7acff44e8f32887b3ee8cc6 (patch) | |
tree | 8476524e8b13e7a737102885be9667aa10b374fc /tools/libxl/libxl.h | |
parent | 45f57813f646967f93ddadf28a1eb7b2464d35a7 (diff) | |
download | xen-fb0ddeafbc3334a5d7acff44e8f32887b3ee8cc6.tar.gz xen-fb0ddeafbc3334a5d7acff44e8f32887b3ee8cc6.tar.bz2 xen-fb0ddeafbc3334a5d7acff44e8f32887b3ee8cc6.zip |
libxl: make devid a type so it is initialized properly
Previously device ids in libxl were treated as integers meaning they
were being initialized to 0, which is a valid device id. This patch
makes devid its own type in libxl and initializes it to -1, an invalid
value.
This fixes a bug where if you try to do a xl DEV-attach multiple
time it will continuously try to reattach device 0 instead of
generating a new device id.
Signed-off-by: Matthew Fioravante <matthew.fioravante@jhuapl.edu>
Reviewed-by: George Dunlap <george.dunlap@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
Diffstat (limited to 'tools/libxl/libxl.h')
-rw-r--r-- | tools/libxl/libxl.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/libxl/libxl.h b/tools/libxl/libxl.h index 599c7f10d0..7a7c4193ef 100644 --- a/tools/libxl/libxl.h +++ b/tools/libxl/libxl.h @@ -307,6 +307,7 @@ void libxl_cpuid_dispose(libxl_cpuid_policy_list *cpuid_list); #define LIBXL_PCI_FUNC_ALL (~0U) typedef uint32_t libxl_domid; +typedef int libxl_devid; /* * Formatting Enumerations. |