Module Name:    src
Committed By:   pooka
Date:           Sat Mar  5 13:47:43 UTC 2011

Modified Files:
        src/sbin/newfs_msdos: newfs_msdos.c

Log Message:
Set errno to 0 before strtoll() so that it can reliably be tested
afterwards.  Fixes newfs_msdos at least on sparc.  Incidentally,
the msdosfs tests also start working on sparc, which about halves
the number of test failures on that platform.


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/sbin/newfs_msdos/newfs_msdos.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sbin/newfs_msdos/newfs_msdos.c
diff -u src/sbin/newfs_msdos/newfs_msdos.c:1.34 src/sbin/newfs_msdos/newfs_msdos.c:1.35
--- src/sbin/newfs_msdos/newfs_msdos.c:1.34	Sat Apr 11 06:59:18 2009
+++ src/sbin/newfs_msdos/newfs_msdos.c	Sat Mar  5 13:47:43 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: newfs_msdos.c,v 1.34 2009/04/11 06:59:18 lukem Exp $	*/
+/*	$NetBSD: newfs_msdos.c,v 1.35 2011/03/05 13:47:43 pooka Exp $	*/
 
 /*
  * Copyright (c) 1998 Robert Nordier
@@ -33,7 +33,7 @@
 static const char rcsid[] =
   "$FreeBSD: src/sbin/newfs_msdos/newfs_msdos.c,v 1.15 2000/10/10 01:49:37 wollman Exp $";
 #else
-__RCSID("$NetBSD: newfs_msdos.c,v 1.34 2009/04/11 06:59:18 lukem Exp $");
+__RCSID("$NetBSD: newfs_msdos.c,v 1.35 2011/03/05 13:47:43 pooka Exp $");
 #endif
 #endif /* not lint */
 
@@ -922,6 +922,7 @@
     char *s;
     off_t x;
 
+    errno = 0;
     x = strtoll(arg, &s, 0);
     /* allow at most one extra char */
     if (errno || x < 0 || (s[0] && s[1]) )

Reply via email to