From: robertl Date: Sun, 31 Oct 2004 20:23:58 +0000 (+0000) Subject: Add some UNIX-y if usb do(nothing) stubs. X-Git-Tag: archive/raspbian/1.10.0+ds-2+rpi1~1^2~12^2~11^2~3888 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=564a582cce44709a6659e334263703a73649a98a;p=gpsbabel.git Add some UNIX-y if usb do(nothing) stubs. --- diff --git a/gpsbabel/jeeps/gpsserial.c b/gpsbabel/jeeps/gpsserial.c index 60b62545f..1953500d2 100644 --- a/gpsbabel/jeeps/gpsserial.c +++ b/gpsbabel/jeeps/gpsserial.c @@ -221,6 +221,8 @@ static struct termios gps_ttysave; int32 GPS_Serial_Savetty(const char *port) { int32 fd; + + if (gps_is_usb) return 1; if((fd = open(port, O_RDWR|O_NDELAY))==-1) { @@ -262,6 +264,8 @@ int32 GPS_Serial_Savetty(const char *port) int32 GPS_Serial_Restoretty(const char *port) { int32 fd; + + if (gps_is_usb) return 1; if((fd = open(port, O_RDWR|O_NDELAY))==-1) { @@ -385,6 +389,7 @@ int32 GPS_Serial_Write(int32 handle, const void *obuf, int size) ************************************************************************/ int32 GPS_Serial_Flush(int32 fd) { + if (gps_is_usb) return 1; if(tcflush(fd,TCIOFLUSH)) { @@ -411,6 +416,8 @@ int32 GPS_Serial_Flush(int32 fd) int32 GPS_Serial_Close(int32 fd, const char *port) { + if (gps_is_usb) return 1; + if(close(fd)==-1) { perror("close");