[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH v10 10/12] tools/libxl: move PCI-related macros in a header file
Currently, the PCI-related macro used by libxl are in the libxl_pci.c source file. This commit moves them to a new libxl_pci.h header; such a change is instrumental to the following commit, as it lets other libxl source files be able to access the macros by including the header. Signed-off-by: Arianna Avanzini <avanzini.arianna@xxxxxxxxx> Cc: Dario Faggioli <dario.faggioli@xxxxxxxxxx> Cc: Paolo Valente <paolo.valente@xxxxxxxxxx> Cc: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx> Cc: Julien Grall <julien.grall@xxxxxxxxxx> Cc: Ian Campbell <Ian.Campbell@xxxxxxxxxxxxx> Cc: Jan Beulich <JBeulich@xxxxxxxx> Cc: Keir Fraser <keir@xxxxxxx> Cc: Tim Deegan <tim@xxxxxxx> Cc: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx> Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> Cc: Eric Trudeau <etrudeau@xxxxxxxxxxxx> Cc: Viktor Kleinik <viktor.kleinik@xxxxxxxxxxxxxxx> --- tools/libxl/libxl_pci.c | 7 +------ tools/libxl/libxl_pci.h | 10 ++++++++++ 2 files changed, 11 insertions(+), 6 deletions(-) create mode 100644 tools/libxl/libxl_pci.h diff --git a/tools/libxl/libxl_pci.c b/tools/libxl/libxl_pci.c index 2782d0e..21ecab1 100644 --- a/tools/libxl/libxl_pci.c +++ b/tools/libxl/libxl_pci.c @@ -17,12 +17,7 @@ #include "libxl_osdeps.h" /* must come before any other headers */ #include "libxl_internal.h" - -#define PCI_BDF "%04x:%02x:%02x.%01x" -#define PCI_BDF_SHORT "%02x:%02x.%01x" -#define PCI_BDF_VDEVFN "%04x:%02x:%02x.%01x@%02x" -#define PCI_OPTIONS "msitranslate=%d,power_mgmt=%d" -#define PCI_BDF_XSPATH "%04x-%02x-%02x-%01x" +#include "libxl_pci.h" static unsigned int pcidev_encode_bdf(libxl_device_pci *pcidev) { diff --git a/tools/libxl/libxl_pci.h b/tools/libxl/libxl_pci.h new file mode 100644 index 0000000..ed0e45a --- /dev/null +++ b/tools/libxl/libxl_pci.h @@ -0,0 +1,10 @@ +#ifndef LIBXL_PCI_H +#define LIBXL_PCI_H + +#define PCI_BDF "%04x:%02x:%02x.%01x" +#define PCI_BDF_SHORT "%02x:%02x.%01x" +#define PCI_BDF_VDEVFN "%04x:%02x:%02x.%01x@%02x" +#define PCI_OPTIONS "msitranslate=%d,power_mgmt=%d" +#define PCI_BDF_XSPATH "%04x-%02x-%02x-%01x" + +#endif /* LIBXL_PCI_H */ -- 2.0.3 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |