From 33cd29fe0d93dc32c436f08871a62756699767f9 Mon Sep 17 00:00:00 2001 From: mjacob Date: Thu, 5 Nov 1998 03:26:36 +0000 Subject: For large filesystems you can run past default resource limits causing fsck to exit unhappily. Fix this by doing a getrlimit/setrlimit for RLIMIT_DATA. I made the same fix in NetBSD. Reviewed by: dg@root.com --- sbin/fsck_ffs/main.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'sbin/fsck_ffs') diff --git a/sbin/fsck_ffs/main.c b/sbin/fsck_ffs/main.c index 9ff947c..317015b 100644 --- a/sbin/fsck_ffs/main.c +++ b/sbin/fsck_ffs/main.c @@ -42,12 +42,13 @@ static const char copyright[] = static char sccsid[] = "@(#)main.c 8.6 (Berkeley) 5/14/95"; #endif static const char rcsid[] = - "$Id: main.c,v 1.13 1998/03/08 09:55:26 julian Exp $"; + "$Id: main.c,v 1.14 1998/06/15 07:07:16 charnier Exp $"; #endif /* not lint */ #include #include #include +#include #include #include @@ -73,7 +74,12 @@ main(argc, argv) { int ch; int ret, maxrun = 0; + struct rlimit rlim; + if (getrlimit(RLIMIT_DATA, &rlim) == 0) { + rlim.rlim_cur = rlim.rlim_max; + (void) setrlimit(RLIMIT_DATA, &rlim); + } sync(); while ((ch = getopt(argc, argv, "dfpnNyYb:c:l:m:")) != -1) { switch (ch) { -- cgit v1.1