FS#4055 - lshwd needs adapting for xorg7?
Attached to Project:
Arch Linux
Opened by Michael Towers (gradgrind) - Friday, 24 February 2006, 14:29 GMT
Last edited by Tobias Powalowski (tpowa) - Tuesday, 28 February 2006, 06:12 GMT
Opened by Michael Towers (gradgrind) - Friday, 24 February 2006, 14:29 GMT
Last edited by Tobias Powalowski (tpowa) - Tuesday, 28 February 2006, 06:12 GMT
|
Details
Could the hard-wired paths XPATH and XMODPATH (no longer
correct for Xorg7) in lshwd.c be responsible for the newly
encountered failure of video module detection?
Unfortunately when I tried to recompile the package, I got a pile of errors: lshwd.c: In function 'check_module': lshwd.c:753: error: 'byte' undeclared (first use in this function) lshwd.c:753: error: (Each undeclared identifier is reported only once lshwd.c:753: error: for each function it appears in.) lshwd.c:753: error: syntax error before 'descbuf' lshwd.c:758: error: 'modulebuf' undeclared (first use in this function) lshwd.c:759: error: 'descbuf' undeclared (first use in this function) lshwd.c: In function 'list_pci': lshwd.c:775: error: 'byte' undeclared (first use in this function) lshwd.c:775: error: syntax error before 'lastclassbuf' lshwd.c:774: warning: unused variable 'dev' lshwd.c:773: warning: unused variable 'pacc' and so on. I'm afraid this beats my very limited C-knowledge! |
This task depends upon
Closed by Jan de Groot (JGC)
Sunday, 04 February 2007, 13:18 GMT
Reason for closing: Implemented
Additional comments about closing: Thanks for your changes. Made a patch out of your modified .c file, checked it and it appears to work well.
Sunday, 04 February 2007, 13:18 GMT
Reason for closing: Implemented
Additional comments about closing: Thanks for your changes. Made a patch out of your modified .c file, checked it and it appears to work well.
1) New paths:
line 524/5:
#define XPATH "/usr/bin/"
#define XMODPATH "/usr/lib/xorg/modules/drivers/"
2) The drivers now have a .so ending instead of .o:
line 619:
sprintf ( fullpath, XMODPATH "%.31s_drv.so", xmodule );
3) Changed all declarations of type byte to char
4) Seems not to be used, but should probably be Xorg rather than XFree86:
line 545:
const char *xfree4 = "Xorg", *xvesa4 = "vesa";
New lshwd.c attached
which means it makes a mess of hwd ...
for(cnt=0,d=first_dev; d; d=d->next)
{ cnt++;
pci_fill_info(d, PCI_FILL_IDENT | PCI_FILL_BASES); /* Fill in header info we need */
}
What I don't understand is how the existing source code could have produced a working binary - did it really come from this source?
My latest, apparently working version of lshwd.c: