updated on Wed Jan 18 08:00:29 UTC 2012
[aur-mirror.git] / lshwd / lshwd-1.1.3-fixes.patch
blob31b0436b2ec48cbc6cf6434bbe802bcfe8ac8c62
1 --- lshwd-1.1.3/lshwd.c 2007-02-04 13:06:58.000000000 +0000
2 +++ lshwd-1.1.3/lshwd.c 2007-02-04 13:09:45.000000000 +0000
3 @@ -166,7 +166,9 @@ sort_pci_list(void)
5 /* counting number of total devices */
6 for(cnt=0,d=first_dev; d; d=d->next)
7 - cnt++;
8 + { cnt++;
9 + pci_fill_info(d, PCI_FILL_IDENT | PCI_FILL_BASES); /* Fill in header info we need */
10 + }
11 /* allocating memory for all pci devices */
12 h = index = alloca(sizeof(struct pci_dev *) * cnt);
13 for(d=first_dev; d; d=d->next)
14 @@ -521,8 +523,8 @@ find_ethernet_devices(char *module)
16 /* copied getxinfo from hwsetup, by Klaus Knopper <knopper@knopper.net> */
17 #define CARDSDB "/usr/share/hwdata/Cards"
18 -#define XPATH "/usr/X11R6/bin/"
19 -#define XMODPATH "/usr/X11R6/lib/modules/drivers/"
20 +#define XPATH "/usr/bin/"
21 +#define XMODPATH "/usr/lib/xorg/modules/drivers/"
23 int exists(char *filename)
25 @@ -542,7 +544,7 @@ struct xinfo {
26 struct xinfo *
27 getxinfo ( char* devdesc, char* devdriver )
29 - const char *xfree4 = "XFree86", *xvesa4 = "vesa";
30 + const char *xfree4 = "Xorg", *xvesa4 = "vesa";
31 const char *xpath = XPATH;
32 static struct xinfo xi;
33 int rescanned = 0;
34 @@ -616,7 +618,7 @@ getxinfo ( char* devdesc, char* devdrive
35 char xmodule[ 32 ];
36 char fullpath[ 128 ];
37 sscanf ( &buffer[ 7 ], "%31s", xmodule );
38 - sprintf ( fullpath, XMODPATH "%.31s_drv.o", xmodule );
39 + sprintf ( fullpath, XMODPATH "%.31s_drv.so", xmodule );
40 if ( exists ( fullpath ) )
42 strncpy ( xi.xmodule, xmodule, sizeof( xi.xmodule ) );
43 @@ -750,7 +752,7 @@ int
44 check_module(char *module)
46 struct pci_dev *d;
47 - byte descbuf[128], modulebuf[128];
48 + char descbuf[128], modulebuf[128];
50 for(d=first_dev; d; d=d->next)
52 @@ -772,8 +774,8 @@ list_pci(void)
53 unsigned int c;
54 struct pci_access *pacc;
55 struct pci_dev *dev;
56 - byte lastclassbuf[128]={0};
57 - byte classbuf[128], descbuf[128], modulebuf[128];
58 + char lastclassbuf[128]={0};
59 + char classbuf[128], descbuf[128], modulebuf[128];
60 char idstring[20]={0};
62 init_lookup_block("pcitable");
63 @@ -814,7 +816,6 @@ list_pci(void)
64 for(dev=first_dev; dev; dev=dev->next) /* Iterate over all devices */
66 /* look for pci information : name, module, description */
67 - pci_fill_info(dev, PCI_FILL_IDENT | PCI_FILL_BASES); /* Fill in header info we need */
68 c = pci_read_word(dev, PCI_CLASS_DEVICE); /* Read config register directly */
69 char *pclassbuf =
70 pci_lookup_name(pacc, classbuf, sizeof(classbuf),
71 @@ -905,8 +906,8 @@ list_usb(void)
72 usb_dev_handle *udev;
73 struct usb_device *dev;
74 struct usb_interface_descriptor desc;
75 - byte lastclassbuf[128]={0};
76 - byte string[128],classbuf[128], descbuf[128], modulebuf[128];
77 + char lastclassbuf[128]={0};
78 + char string[128],classbuf[128], descbuf[128], modulebuf[128];
79 char idstring[20]={0};
81 /* TODO: the approp modules are loaded anyway if usb controllers were found, so
82 @@ -1041,7 +1042,7 @@ out_list_usb:
83 void
84 list_mouse(void)
86 - byte devicebuf[128], descbuf[128], modulebuf[128];
87 + char devicebuf[128], descbuf[128], modulebuf[128];
88 char idstring[20]={0};
90 if (psauxProbe( devicebuf, modulebuf, descbuf))
91 @@ -1087,8 +1088,8 @@ list_pcmcia(void)
92 cistpl_funcid_t *funcid = &arg.tuple_parse.parse.funcid;
93 config_info_t config;
94 int fd[MAX_SOCKS];
95 - byte lastclassbuf[128]={0};
96 - byte string[128],classbuf[128], descbuf[128], modulebuf[128];
97 + char lastclassbuf[128]={0};
98 + char string[128],classbuf[128], descbuf[128], modulebuf[128];
99 char idstring[20]={0};
100 static char *pcmcia_fn[] =
102 @@ -1171,8 +1172,8 @@ list_firewire(void)
104 //int loaded_driver = 0;
105 unsigned long specid, version;
106 - byte lastclassbuf[128]={0};
107 - byte node[16],classbuf[128], descbuf[128], modulebuf[128];
108 + char lastclassbuf[128]={0};
109 + char node[16],classbuf[128], descbuf[128], modulebuf[128];
110 char idstring[20]={0};
112 char *next, *buf = NULL, *tmp;