libxl: make devid a type so it is initialized properly
authorMatthew Fioravante <matthew.fioravante@jhuapl.edu>
Fri, 5 Oct 2012 13:34:27 +0000 (14:34 +0100)
committerMatthew Fioravante <matthew.fioravante@jhuapl.edu>
Fri, 5 Oct 2012 13:34:27 +0000 (14:34 +0100)
commitfb0ddeafbc3334a5d7acff44e8f32887b3ee8cc6
tree8476524e8b13e7a737102885be9667aa10b374fc
parent45f57813f646967f93ddadf28a1eb7b2464d35a7
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>
tools/libxl/gentest.py
tools/libxl/libxl.h
tools/libxl/libxl_types.idl
tools/ocaml/libs/xl/genwrap.py
tools/ocaml/libs/xl/xenlight.ml.in
tools/ocaml/libs/xl/xenlight.mli.in
tools/python/xen/lowlevel/xl/xl.c