From mboxrd@z Thu Jan 1 00:00:00 1970 From: Arianna Avanzini Subject: [PATCH v10 10/12] tools/libxl: move PCI-related macros in a header file Date: Tue, 29 Jul 2014 00:12:07 +0200 Message-ID: <1406585529-32193-11-git-send-email-avanzini.arianna@gmail.com> References: <1406585529-32193-1-git-send-email-avanzini.arianna@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1406585529-32193-1-git-send-email-avanzini.arianna@gmail.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xen.org Cc: Ian.Campbell@eu.citrix.com, paolo.valente@unimore.it, keir@xen.org, stefano.stabellini@eu.citrix.com, Ian.Jackson@eu.citrix.com, dario.faggioli@citrix.com, tim@xen.org, julien.grall@citrix.com, etrudeau@broadcom.com, andrew.cooper3@citrix.com, JBeulich@suse.com, avanzini.arianna@gmail.com, viktor.kleinik@globallogic.com List-Id: xen-devel@lists.xenproject.org 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 Cc: Dario Faggioli Cc: Paolo Valente Cc: Stefano Stabellini Cc: Julien Grall Cc: Ian Campbell Cc: Jan Beulich Cc: Keir Fraser Cc: Tim Deegan Cc: Ian Jackson Cc: Andrew Cooper Cc: Eric Trudeau Cc: Viktor Kleinik --- 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