summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2009-10-01 07:48:32 +0000
committerThierry Vignaud <tv@mandriva.org>2009-10-01 07:48:32 +0000
commit440e9802ed3b4a4af20c06cbd9f7beb9e964f87d (patch)
tree672f433f8b7884a4511969382a0a6995514dcc51
parent41831cfa1ec9a17a0e152ab8abdc87c400fec69b (diff)
downloadldetect-440e9802ed3b4a4af20c06cbd9f7beb9e964f87d.tar
ldetect-440e9802ed3b4a4af20c06cbd9f7beb9e964f87d.tar.gz
ldetect-440e9802ed3b4a4af20c06cbd9f7beb9e964f87d.tar.bz2
ldetect-440e9802ed3b4a4af20c06cbd9f7beb9e964f87d.tar.xz
ldetect-440e9802ed3b4a4af20c06cbd9f7beb9e964f87d.zip
use same types as in libpci (in order to please Teuf)
-rw-r--r--libldetect.h26
-rw-r--r--pciusb.c6
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 <stdint.h>
+
/******************************************************************************/
/* 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;