[LTP] [PATCH 1/3] ioctl01: Add default tty device
Petr Vorel
pvorel@suse.cz
Wed Feb 8 14:54:05 CET 2023
Hi Li,
> > +#define DEFAULT_TTY_DEVICE "/dev/tty0"
> Hidden the device path parameter is a good idea.
> But maybe can we add a function to find available char devices instead
> of using the tty0 as default? In that function, we do the S_ISCHR() check
> and return the valid path of it. Then the rest test (e.g. ioctl02) can make
> use of it but not set the specified device as well. WDYT?
FYI I'm using S_ISCHR() in other patches, which check if device can be used.
Implementing search looks like a good idea. Are useful files any /dev/tty*
(including /dev/tty, /dev/ttyACM0, /dev/ttyS0) or should I avoid any file
or include other paths?
Kind regards,
Petr
More information about the ltp
mailing list