On Tuesday, 31 בAugust 2010 12:22:02 Oleg Goldshmidt wrote:
> 2010/8/31 Erez D <[email protected]>:
> > I am looking for a simple way to know which serial ports i have.

Instead of searching through /proc and /sys you should use hal:
 * To see everything, simply run 'lshal'
 * To find UDI's of all serial devices, run:
     hal-find-by-capability --capability serial
 * To get a specific property (e.g: the device file name):
     hal-get-property --udi <udi_string> --key linux.device_file

From a program, just use the HAL API's.
HAL is being deprecated (by DeviceKit/udev), but is still there
for a while (at least with respect to legacy hardware like serial
ports).

-- 
Oron Peled                                 Voice: +972-4-8228492
[email protected]                  http://users.actcom.co.il/~oron
"Normal people ... believe that if it ain't broke, don't fix it.
Engineers believe that if it ain't broke, it doesn't have enough
features ... yet." -- Scott Adams

_______________________________________________
Linux-il mailing list
[email protected]
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il

Reply via email to