diff --git a/usr.sbin/ndbootd/README b/usr.sbin/ndbootd/README index f98dc7b64da9..36e326470b44 100644 --- a/usr.sbin/ndbootd/README +++ b/usr.sbin/ndbootd/README @@ -1,6 +1,6 @@ -# $NetBSD: README,v 1.2 2001/05/22 14:41:59 fredette Exp $ +# $NetBSD: README,v 1.3 2001/06/13 21:38:30 fredette Exp $ -README for ndbootd-0.1 +README for ndbootd-0.5 Copyright (c) 2001 Matthew Fredette. All rights reserved. diff --git a/usr.sbin/ndbootd/config.h b/usr.sbin/ndbootd/config.h index f75d59376cbc..aeae238b706e 100644 --- a/usr.sbin/ndbootd/config.h +++ b/usr.sbin/ndbootd/config.h @@ -1,4 +1,4 @@ -/* $NetBSD: config.h,v 1.3 2001/05/23 02:59:35 fredette Exp $ */ +/* $NetBSD: config.h,v 1.4 2001/06/13 21:38:30 fredette Exp $ */ /* config.h. Generated automatically by configure. */ /* config.h.in. Generated automatically from configure.in by autoheader. */ @@ -70,5 +70,5 @@ #define PACKAGE "ndbootd" /* Version number of package */ -#define VERSION "0.4" +#define VERSION "0.5" diff --git a/usr.sbin/ndbootd/ndbootd.c b/usr.sbin/ndbootd/ndbootd.c index c12689d50b40..eeeb01cae6c1 100644 --- a/usr.sbin/ndbootd/ndbootd.c +++ b/usr.sbin/ndbootd/ndbootd.c @@ -1,4 +1,4 @@ -/* $NetBSD: ndbootd.c,v 1.3 2001/05/23 02:59:35 fredette Exp $ */ +/* $NetBSD: ndbootd.c,v 1.4 2001/06/13 21:38:30 fredette Exp $ */ /* ndbootd.c - the Sun Network Disk (nd) daemon: */ @@ -25,10 +25,15 @@ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. */ -/* <> */ +/* <> */ /* * <> + * Revision 1.9 2001/06/13 21:19:11 fredette + * (main): Don't assume that a successful, but short, read + * leaves a zero in errno. Instead, just check for the short + * read by looking at the byte count that read returned. + * * Revision 1.8 2001/05/23 02:35:36 fredette * Changed many debugging printfs to compile quietly on the * alpha. Patch from Andrew Brown . @@ -72,7 +77,7 @@ * */ -static const char _ndbootd_c_rcsid[] = "<>"; +static const char _ndbootd_c_rcsid[] = "<>"; /* includes: */ #include "ndbootd.h" @@ -866,7 +871,7 @@ where OPTIONS are:\n\ * first-stage boot program is a * multiple of NDBOOT_BSIZE: */ if (byte_count_read != byte_count_wanted - && errno == 0 + && byte_count_read > 0 && file_offset + byte_count_read == boot1_byte_count) { byte_count_read = byte_count_wanted; } @@ -914,7 +919,7 @@ where OPTIONS are:\n\ * second-stage boot program is a * multiple of NDBOOT_BSIZE: */ if (byte_count_read != byte_count_wanted - && errno == 0 + && byte_count_read > 0 && file_offset + byte_count_read == boot2_byte_count) { byte_count_read = byte_count_wanted; }