I've done it before by combining several approaches until I had all the information I wanted. I parsed dmesg and scanned the /proc virtual filesystem. I was working on a Red Hat system so I also went through /etc/sysconfig/hwconf (Fedora Core should have this too I suppose).