The way I would recommend for pci bus scanning is to parse /proc/bus/pci/devices the only problem is that this is linux specific. Something similar can be done on other OSes though. Another way which is more portable is to use libpci but it isn't installed on all systems. Guess something like this would need to be added to some 'kernel' dll...
Roderick
PS: if one of you know a way to implement pci bus scanning on wine i'll be happy
On Wed, Nov 30, 2005 at 07:56:54AM +0100, Roderick Colenbrander wrote:
The way I would recommend for pci bus scanning is to parse /proc/bus/pci/devices the only problem is that this is linux specific. Something similar can be done on other OSes though. Another way which is more portable is to use libpci but it isn't installed on all systems. Guess something like this would need to be added to some 'kernel' dll...
Better use libsysfs or /sys/ directly if you do that.
Ciao, Marcus
On Wed, Nov 30, 2005 at 07:56:54AM +0100, Roderick Colenbrander wrote:
The way I would recommend for pci bus scanning is to parse /proc/bus/pci/devices the only problem is that this is linux specific. Something similar can be done on other OSes though. Another way which is more portable is to use libpci but it isn't installed on all systems.
Guess
something like this would need to be added to some 'kernel' dll...
Better use libsysfs or /sys/ directly if you do that.
Ciao, Marcus
The use of /sys is an option too but it is 2.6x specific. The same holds for libsysfs and I'm not sure if everyone has the library installed. Parsing of the devices file is very easy and the file format has been the same for a long while (atleast from 2.2x to 2.6x). Each line just contains the device/vendor ids, pci device class and everything else we might need. In case of /sys a lot of dirctories/files need to be checked for detection whereas for /proc/bus/pci/devices only one simple file needs to be checked.
Roderick
HAL? OK it's not much less Linux specific right now than anything else, but HAL is supposed to be the canonical hardware abstraction so it makes sense to use it.
On Wed, 30 Nov 2005 07:56:54 +0100, Roderick Colenbrander wrote:
PS: if one of you know a way to implement pci bus scanning on wine i'll be happy
On Wednesday 30 November 2005 22:32, Mike Hearn wrote:
HAL? OK it's not much less Linux specific right now than anything else, but HAL is supposed to be the canonical hardware abstraction so it makes sense to use it.
On Wed, 30 Nov 2005 07:56:54 +0100, Roderick Colenbrander wrote:
PS: if one of you know a way to implement pci bus scanning on wine i'll be happy
Thanks to all,
i'll try HAL now (anyway i'll see libpci) i'll be cool if wine provide a abstract way to do that but for now ...
Regads, Raphael