Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-1-4]: src/bin/df pull up rev 1.32 from trunk (requested by hubertf):



details:   https://anonhg.NetBSD.org/src/rev/f5661ccc13b1
branches:  netbsd-1-4
changeset: 469485:f5661ccc13b1
user:      cgd <cgd%NetBSD.org@localhost>
date:      Sun Sep 26 02:03:53 1999 +0000

description:
pull up rev 1.32 from trunk (requested by hubertf):
  Fix overflow on big partition's raw device.

diffstat:

 bin/df/df.c |  15 ++++++++++++---
 1 files changed, 12 insertions(+), 3 deletions(-)

diffs (37 lines):

diff -r 0acf5816c6c3 -r f5661ccc13b1 bin/df/df.c
--- a/bin/df/df.c       Sun Sep 26 02:00:51 1999 +0000
+++ b/bin/df/df.c       Sun Sep 26 02:03:53 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: df.c,v 1.31 1998/10/08 02:10:36 wsanchez Exp $ */
+/*     $NetBSD: df.c,v 1.31.2.1 1999/09/26 02:03:53 cgd Exp $  */
 
 /*
  * Copyright (c) 1980, 1990, 1993, 1994
@@ -49,7 +49,7 @@
 #if 0
 static char sccsid[] = "@(#)df.c       8.7 (Berkeley) 4/2/94";
 #else
-__RCSID("$NetBSD: df.c,v 1.31 1998/10/08 02:10:36 wsanchez Exp $");
+__RCSID("$NetBSD: df.c,v 1.31.2.1 1999/09/26 02:03:53 cgd Exp $");
 #endif
 #endif /* not lint */
 
@@ -297,8 +297,17 @@
                        continue;
                if (nflag)
                        mntbuf[j] = mntbuf[i];
-               else
+               else {
+                       struct statfs layerbuf = mntbuf[i];
                        (void)statfs(mntbuf[i].f_mntonname, &mntbuf[j]);
+                       /*
+                        * If the FS name changed, then new data is for
+                        * a different layer and we don't want it.
+                        */
+                       if(memcmp(layerbuf.f_mntfromname,
+                                mntbuf[j].f_mntfromname, MNAMELEN))
+                                mntbuf[j] = layerbuf;
+               }
                j++;
        }
        return (j);



Home | Main Index | Thread Index | Old Index