mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-12-27 04:12:29 +01:00
21 lines
866 B
Diff
21 lines
866 B
Diff
--- statserial-1.1.orig/statserial.c
|
|
+++ statserial-1.1/statserial.c
|
|
@@ -42,7 +42,7 @@
|
|
|
|
/* global variables */
|
|
char device[255]; /* name of device to open */
|
|
-const char *defaultDevice = "/dev/cua1"; /* default device if none specified on command line */
|
|
+const char *defaultDevice = "/dev/ttyS1"; /* default device if none specified on command line */
|
|
int n_option = 0; /* set if -n option is used */
|
|
int d_option = 0; /* set if -d option is used */
|
|
int x_option = 0; /* set if -x option is used */
|
|
@@ -118,7 +118,7 @@
|
|
parse_args(argc, argv);
|
|
|
|
/* open port */
|
|
- fd = open(device, O_RDONLY);
|
|
+ fd = open(device, O_RDONLY | O_NONBLOCK | O_NOCTTY);
|
|
if (fd == -1) {
|
|
char s[255];
|
|
sprintf(s, "statserial: can't open device `%s'", device);
|