[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: how to know the real device used by /dev/console ?

> Hello,
>   is there a way (an ioctl or such) to get the real device connected to
> /dev/console ?  Especially, I need to know whether the console is connected to
> a serial one or not.

Hmm, you could check /proc/openprom/std{in,out}-path. If both are the same, the PROM console is serial. There may be better ways though...


 -- Of course I'm crazy, but that doesn't mean I'm wrong.
Anders Hammarquist                                  | iko@cd.chalmers.se
Physics student                                     | Hem: +46 31 47 69 27
Chalmers University of Technology, G|teborg, Sweden | Mob: +46 707 27 86 87

Reply to: