aboutsummaryrefslogtreecommitdiffstats
path: root/tools/libxl/libxl.h
diff options
context:
space:
mode:
authorMatthew Fioravante <matthew.fioravante@jhuapl.edu>2012-10-05 14:34:27 +0100
committerMatthew Fioravante <matthew.fioravante@jhuapl.edu>2012-10-05 14:34:27 +0100
commitfb0ddeafbc3334a5d7acff44e8f32887b3ee8cc6 (patch)
tree8476524e8b13e7a737102885be9667aa10b374fc /tools/libxl/libxl.h
parent45f57813f646967f93ddadf28a1eb7b2464d35a7 (diff)
downloadxen-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.h1
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.