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,