$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 #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;