From: Bert Vermeulen Date: Thu, 12 Aug 2010 04:04:44 +0000 (+0200) Subject: oops, fix serial_flush() X-Git-Tag: libsigrok-0.1.0~481 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=f0551a6543206a0970410481b8e36bbfa6a609ea;p=libsigrok.git oops, fix serial_flush() --- diff --git a/hardware/common/serial.c b/hardware/common/serial.c index 6bf0e402..3ecd124e 100644 --- a/hardware/common/serial.c +++ b/hardware/common/serial.c @@ -98,8 +98,7 @@ int serial_close(int fd) int serial_flush(int fd) { - tcflush(fd, TCIOFLUSH); - + return tcflush(fd, TCIOFLUSH); } void *serial_backup_params(int fd) diff --git a/sigrok.h b/sigrok.h index ec1b0180..a1531bf7 100644 --- a/sigrok.h +++ b/sigrok.h @@ -429,6 +429,7 @@ int ezusb_upload_firmware(libusb_device *dev, int configuration, GSList *list_serial_ports(void); int serial_open(const char *pathname, int flags); int serial_close(int fd); +int serial_flush(int fd); void *serial_backup_params(int fd); void serial_restore_params(int fd, void *backup); int serial_set_params(int fd, int speed, int bits, int parity, int stopbits,