Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-4]: src/usr.sbin/quot pull up revs 1.15-1.16 from trunk (reques...
details: https://anonhg.NetBSD.org/src/rev/a7a1fb377eee
branches: netbsd-1-4
changeset: 469550:a7a1fb377eee
user: cgd <cgd%NetBSD.org@localhost>
date: Sun Oct 10 20:10:22 1999 +0000
description:
pull up revs 1.15-1.16 from trunk (requested by mycroft):
Fix integer overflows with file systems >=2GB.
diffstat:
usr.sbin/quot/quot.c | 18 +++++++++---------
1 files changed, 9 insertions(+), 9 deletions(-)
diffs (59 lines):
diff -r b3ed08d43472 -r a7a1fb377eee usr.sbin/quot/quot.c
--- a/usr.sbin/quot/quot.c Sat Oct 09 21:49:30 1999 +0000
+++ b/usr.sbin/quot/quot.c Sun Oct 10 20:10:22 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: quot.c,v 1.14 1998/03/01 02:26:03 fvdl Exp $ */
+/* $NetBSD: quot.c,v 1.14.2.1 1999/10/10 20:10:22 cgd Exp $ */
/*
* Copyright (C) 1991, 1994 Wolfgang Solfrank.
@@ -33,7 +33,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: quot.c,v 1.14 1998/03/01 02:26:03 fvdl Exp $");
+__RCSID("$NetBSD: quot.c,v 1.14.2.1 1999/10/10 20:10:22 cgd Exp $");
#endif /* not lint */
#include <sys/param.h>
@@ -70,9 +70,9 @@
* kByte when done (on request).
*/
#ifdef COMPAT
-#define SIZE(n) (n)
+#define SIZE(n) ((long long)(n))
#else
-#define SIZE(n) howmany((n) * DEV_BSIZE, blocksize)
+#define SIZE(n) howmany((long long)(n) * DEV_BSIZE, (long long)blocksize)
#endif
#define INOCNT(fs) ((fs)->fs_ipg)
@@ -405,10 +405,10 @@
for (fp = fsizes; fp; fp = fp->fsz_next) {
for (i = 0; i < FSZCNT; i++) {
if (fp->fsz_count[i])
- printf("%ld\t%ld\t%ld\n",
+ printf("%ld\t%ld\t%lld\n",
(long)(fp->fsz_first + i),
(long)fp->fsz_count[i],
- (long)SIZE(sz += fp->fsz_sz[i]));
+ SIZE(sz += fp->fsz_sz[i]));
}
}
}
@@ -439,12 +439,12 @@
memmove(usrs, users, nusers * sizeof(struct user));
sortusers(usrs);
for (usr = usrs, n = nusers; --n >= 0 && usr->count; usr++) {
- printf("%5ld", (long)SIZE(usr->space));
+ printf("%5lld", SIZE(usr->space));
if (count)
- printf("\t%5ld", (long)usr->count);
+ printf("\t%5ld", usr->count);
printf("\t%-8s", usr->name);
if (unused)
- printf("\t%5ld\t%5ld\t%5ld",
+ printf("\t%5lld\t%5lld\t%5lld",
SIZE(usr->spc30), SIZE(usr->spc60),
SIZE(usr->spc90));
printf("\n");
Home |
Main Index |
Thread Index |
Old Index