mirror of
https://github.com/tio/tio.git
synced 2026-05-01 14:57:59 +02:00
Add list serial devices feature
For convenience, add a --list-devices option which lists the available serial devices.
This commit is contained in:
parent
6310f28d2c
commit
7a2a18232d
8 changed files with 55 additions and 2 deletions
|
|
@ -31,7 +31,7 @@
|
|||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
int status;
|
||||
int status = 0;
|
||||
|
||||
/* Install error exit handler */
|
||||
atexit(&error_exit);
|
||||
|
|
@ -39,6 +39,13 @@ int main(int argc, char *argv[])
|
|||
/* Parse options */
|
||||
parse_options(argc, argv);
|
||||
|
||||
/* List available serial devices */
|
||||
if (option.list_devices)
|
||||
{
|
||||
list_serial_devices();
|
||||
return status;
|
||||
}
|
||||
|
||||
/* Configure tty device */
|
||||
tty_configure();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue