1
0
mirror of https://github.com/UzixLS/picocom.git synced 2025-07-19 07:21:18 +03:00

Merge pull request #70 from the-dem/more-compat

Add compatibility with 1.x
This commit is contained in:
Nick Patavalis
2017-12-12 20:38:49 +02:00
committed by GitHub

View File

@ -1420,6 +1420,8 @@ parse_args(int argc, char *argv[])
switch (optarg[0]) {
case 'X':
case 'x':
case 'S':
case 's':
opts.flow = FC_XONXOFF;
break;
case 'H':
@ -1481,13 +1483,22 @@ parse_args(int argc, char *argv[])
}
break;
case 'p':
opts.stopbits = 1;
switch (optarg[0]) {
case '1':
opts.stopbits = 1;
break;
case '2':
opts.stopbits = 2;
break;
case 'e':
opts.parity = P_EVEN;
break;
case 'o':
opts.parity = P_ODD;
break;
case 'n':
opts.parity = P_NONE;
break;
default:
fprintf(stderr, "Invalid --stopbits: %c\n", optarg[0]);
r = -1;