Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-4]: src/sbin/newfs Pull up revision 1.38 (requested by bouyer):
details: https://anonhg.NetBSD.org/src/rev/1a64a1c4a465
branches: netbsd-1-4
changeset: 470625:1a64a1c4a465
user: he <he%NetBSD.org@localhost>
date: Thu Jun 01 17:21:02 2000 +0000
description:
Pull up revision 1.38 (requested by bouyer):
Abort if the number of cylinder group summary area is larger than
MAXCSBUFS.
diffstat:
sbin/newfs/mkfs.c | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
diffs (33 lines):
diff -r fb5c324a81cd -r 1a64a1c4a465 sbin/newfs/mkfs.c
--- a/sbin/newfs/mkfs.c Thu Jun 01 17:15:27 2000 +0000
+++ b/sbin/newfs/mkfs.c Thu Jun 01 17:21:02 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: mkfs.c,v 1.35 1999/03/16 21:52:34 wrstuden Exp $ */
+/* $NetBSD: mkfs.c,v 1.35.2.1 2000/06/01 17:21:02 he Exp $ */
/*
* Copyright (c) 1980, 1989, 1993
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)mkfs.c 8.11 (Berkeley) 5/3/95";
#else
-__RCSID("$NetBSD: mkfs.c,v 1.35 1999/03/16 21:52:34 wrstuden Exp $");
+__RCSID("$NetBSD: mkfs.c,v 1.35.2.1 2000/06/01 17:21:02 he Exp $");
#endif
#endif /* not lint */
@@ -558,6 +558,14 @@
sblock.fs_csaddr = cgdmin(&sblock, 0);
sblock.fs_cssize =
fragroundup(&sblock, sblock.fs_ncg * sizeof(struct csum));
+ if (sblock.fs_cssize / sblock.fs_bsize > MAXCSBUFS) {
+ printf("With %d cylinder groups %d cylinder group sumary "
+ "area are needed.\n",
+ sblock.fs_ncg, sblock.fs_cssize / sblock.fs_bsize);
+ printf("Only %ld are available, reduce the number of cylinder "
+ "groups.\n", (long)MAXCSBUFS);
+ exit(38);
+ }
i = sblock.fs_bsize / sizeof(struct csum);
sblock.fs_csmask = ~(i - 1);
for (sblock.fs_csshift = 0; i > 1; i >>= 1)
Home |
Main Index |
Thread Index |
Old Index