X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=hardware%2Flink-mso19%2Flink-mso19.c;h=05729556495d0265204ead4aba3ce36a1b043dc4;hb=f3163a6c2ee7a1d7ec6865f11cfcf52b07dc31f5;hp=308fb50e9c3ce587e79baf363ee47650479b9480;hpb=01cf8814949f4786da4a1be79a74030a691be152;p=libsigrok.git
diff --git a/hardware/link-mso19/link-mso19.c b/hardware/link-mso19/link-mso19.c
index 308fb50e..05729556 100644
--- a/hardware/link-mso19/link-mso19.c
+++ b/hardware/link-mso19/link-mso19.c
@@ -7,6 +7,14 @@
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
*/
#include
@@ -20,6 +28,7 @@
#include
#include
#include
+#include
#include "config.h"
#include "link-mso19.h"
@@ -75,7 +84,7 @@ static int mso_send_control_message(struct sigrok_device_instance *sdi,
w = 0;
while (w < s) {
- ret = write(fd, buf + w, s - w);
+ ret = serial_write(fd, buf + w, s - w);
if (ret < 0) {
ret = SIGROK_ERR;
goto free;
@@ -137,7 +146,7 @@ static int mso_check_trigger(struct sigrok_device_instance *sdi,
return ret;
buf[0] = 0;
- if (read(sdi->serial->fd, buf, 1) != 1) /* FIXME: Need timeout */
+ if (serial_read(sdi->serial->fd, buf, 1) != 1) /* FIXME: Need timeout */
ret = SIGROK_ERR;
*info = buf[0];
@@ -603,7 +612,7 @@ static int receive_data(int fd, int revents, void *user_data)
revents = revents;
- s = read(fd, in, sizeof(in));
+ s = serial_read(fd, in, sizeof(in));
if (s <= 0)
return FALSE;