From: robertl Date: Tue, 4 Jan 2005 03:51:02 +0000 (+0000) Subject: Remove O_NDELAYs from all opens - it torments the Linux/USB ttys for no X-Git-Tag: archive/raspbian/1.10.0+ds-2+rpi1~1^2~12^2~11^2~3841 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=8c57be2c2feb5515e8d081673842f76e50395cef;p=gpsbabel.git Remove O_NDELAYs from all opens - it torments the Linux/USB ttys for no good reason and it's not like the code really does the right thing with O_NDELAY anyway... --- diff --git a/gpsbabel/jeeps/gpsserial.c b/gpsbabel/jeeps/gpsserial.c index 91451311c..68b97a9da 100644 --- a/gpsbabel/jeeps/gpsserial.c +++ b/gpsbabel/jeeps/gpsserial.c @@ -61,6 +61,11 @@ char *rxdata[] = { * internal. This means we ignore that 'fd' number that gets passed in. */ +static HANDLE comport; + +/* + * Display an error from the serial subsystem. + */ void GPS_Serial_Error(char *hdr) { char msg[200]; @@ -76,8 +81,6 @@ void GPS_Serial_Error(char *hdr) GPS_Error(msg); } -static HANDLE comport; - int32 GPS_Serial_On(const char *port, int32 *fd) { DCB tio; @@ -248,7 +251,7 @@ int32 GPS_Serial_Savetty(const char *port) if (gps_is_usb) return 1; - if((fd = open(port, O_RDWR|O_NDELAY))==-1) + if((fd = open(port, O_RDWR))==-1) { perror("open"); gps_errno = SERIAL_ERROR; @@ -264,7 +267,6 @@ int32 GPS_Serial_Savetty(const char *port) return 0; } - if(!GPS_Serial_Close(fd,port)) { gps_errno = SERIAL_ERROR; @@ -291,7 +293,7 @@ int32 GPS_Serial_Restoretty(const char *port) if (gps_is_usb) return 1; - if((fd = open(port, O_RDWR|O_NDELAY))==-1) + if((fd = open(port, O_RDWR))==-1) { perror("open"); gps_errno = HARDWARE_ERROR; @@ -340,7 +342,6 @@ int32 GPS_Serial_Open(int32 *fd, const char *port) return 0; } - if(tcgetattr(*fd,&tty)==-1) { perror("tcgetattr");