From 440e9802ed3b4a4af20c06cbd9f7beb9e964f87d Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Thu, 1 Oct 2009 07:48:32 +0000 Subject: use same types as in libpci (in order to please Teuf) --- libldetect.h | 26 ++++++++++++++------------ pciusb.c | 6 +++--- 2 files changed, 17 insertions(+), 15 deletions(-) diff --git a/libldetect.h b/libldetect.h index 4578496..7c02ae2 100644 --- a/libldetect.h +++ b/libldetect.h @@ -2,26 +2,28 @@ #ifndef LIBLDETECT #define LIBLDETECT +#include + /******************************************************************************/ /* pciusb *********************************************************************/ /******************************************************************************/ struct pciusb_entry { - unsigned short vendor; /* PCI vendor id */ - unsigned short device; /* PCI device id */ + uint16_t vendor; /* PCI vendor id */ + uint16_t device; /* PCI device id */ - unsigned short subvendor; /* 0xffff if not probe_type'd or no subid */ - unsigned short subdevice; /* 0xffff if not probe_type'd or no subid */ - unsigned long class_id; /* 0 if not probe_type'd */ + uint16_t subvendor; /* 0xffff if not probe_type'd or no subid */ + uint16_t subdevice; /* 0xffff if not probe_type'd or no subid */ + unsigned long class_id; /* 0 if not probe_type'd ; big because of USB backend */ - unsigned short pci_domain; /* PCI domain id (16 bits wide in libpci) */ - unsigned short pci_bus; /* PCI bus id 8 bits wide */ - unsigned short pci_device; /* PCI device id 5 bits wide */ - unsigned short pci_function; /* PCI function id 3 bits wide */ - unsigned short pci_revision:8; /* PCI revision 8 bits wide */ + uint16_t pci_domain; /* PCI domain id (16 bits wide in libpci) */ + uint8_t pci_bus; /* PCI bus id 8 bits wide */ + uint8_t pci_device; /* PCI device id 5 bits wide */ + uint8_t pci_function; /* PCI function id 3 bits wide */ + uint8_t pci_revision; /* PCI revision 8 bits wide */ unsigned short usb_port; /* USB port */ - unsigned short is_pciexpress:1; /* is it PCI express */ - int already_found:1; + uint8_t is_pciexpress:1; /* is it PCI express */ + uint8_t already_found:1; char *module; char *text; diff --git a/pciusb.c b/pciusb.c index cc7b0be..bcd901f 100644 --- a/pciusb.c +++ b/pciusb.c @@ -169,9 +169,9 @@ extern void pciusb_initialize(struct pciusb_entry *e) { e->subvendor = 0xffff; e->subdevice = 0xffff; e->class_id = 0; - e->pci_bus = 0xffff; - e->pci_device = 0xffff; - e->pci_function = 0xffff; + e->pci_bus = 0xff; + e->pci_device = 0xff; + e->pci_function = 0xff; e->pci_revision = 0; e->usb_port = 0xffff; e->module = NULL; -- cgit v1.2.1