pkgsrc/misc/open2300/patches/patch-ab
martin e2d8b23d9e Update to open2300-1.8.
This removes a lot of the previous hacks, replacing them with a fixed setup
for the serial port.
2004-11-29 08:22:27 +00:00

24 lines
682 B
Text

$NetBSD: patch-ab,v 1.3 2004/11/29 08:22:27 martin Exp $
--- rw2300.c.orig 2004-11-13 13:10:39.000000000 +0100
+++ rw2300.c 2004-11-29 09:15:14.000000000 +0100
@@ -9,6 +9,7 @@
* This program is published under the GNU General Public license
*/
+#include <errno.h>
#include "rw2300.h"
/********************************************************************/
@@ -2805,8 +2806,10 @@
//Read and verify checksum
if (read_device(ws2300, &answer, 1) != 1)
return -1;
- if (answer != data_checksum(readdata, number))
+ if (answer != data_checksum(readdata, number)) {
+ errno = EIO; // perror is used - so errno needs to be meaningfull
return -1;
+ }
return i;