From: Christopher H. <ch...@us...> - 2002-01-15 01:59:37
|
Update of /cvsroot/blob/blob/utils/mkparamblock In directory usw-pr-cvs1:/tmp/cvs-serv29871/utils/mkparamblock Modified Files: mkparamblock.c Log Message: Make parameters really work by adding include of <arch.h> to param_block.c. Zero autoboot timeout disables autoboot. Index: mkparamblock.c =================================================================== RCS file: /cvsroot/blob/blob/utils/mkparamblock/mkparamblock.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- mkparamblock.c 2002/01/06 18:57:31 1.8 +++ mkparamblock.c 2002/01/15 01:59:34 1.9 @@ -3,6 +3,7 @@ #include <stdio.h> #include <string.h> #include <stdlib.h> +#include <limits.h> #include <sys/stat.h> #define USE_BLOB_TOGETHER_WITH_LIBC #include <blob/param_block.h> @@ -87,7 +88,8 @@ tag.hdr.conf_mask = 0; tag.hdr.conf = 0; - if ((tag.u.bootdelay.delay = strtoul(line, 0, 0)) <= 0) return -1; + if ((tag.u.bootdelay.delay = strtoul(line, 0, 0)) == ULONG_MAX) + return -1; fwrite(&tag, ptag_size(ptag_bootdelay), 4, fp); return 0; |