From b6558b2b5927ac3d7a9d761af14791d0fc4233c0 Mon Sep 17 00:00:00 2001 From: mjacob Date: Sun, 2 Nov 1997 01:42:44 +0000 Subject: [PATCH] Hmmm..fsck_ffs has to really be able to alwasy work, and if you've got a *huge* (like 600GB) filesystem, you need to not be limited by resource limits. --- sbin/fsck_ffs/main.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/sbin/fsck_ffs/main.c b/sbin/fsck_ffs/main.c index af547623811e..4c9c37a3a6ef 100644 --- a/sbin/fsck_ffs/main.c +++ b/sbin/fsck_ffs/main.c @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.28 1997/10/01 02:17:06 enami Exp $ */ +/* $NetBSD: main.c,v 1.29 1997/11/02 01:42:44 mjacob Exp $ */ /* * Copyright (c) 1980, 1986, 1993 @@ -43,13 +43,14 @@ __COPYRIGHT("@(#) Copyright (c) 1980, 1986, 1993\n\ #if 0 static char sccsid[] = "@(#)main.c 8.6 (Berkeley) 5/14/95"; #else -__RCSID("$NetBSD: main.c,v 1.28 1997/10/01 02:17:06 enami Exp $"); +__RCSID("$NetBSD: main.c,v 1.29 1997/11/02 01:42:44 mjacob Exp $"); #endif #endif /* not lint */ #include #include #include +#include #include #include @@ -81,9 +82,14 @@ main(argc, argv) int argc; char *argv[]; { + struct rlimit r; int ch; int ret = 0; + if (getrlimit(RLIMIT_DATA, &r) == 0) { + r.rlim_cur = r.rlim_max; + (void) setrlimit(RLIMIT_DATA, &r); + } sync(); skipclean = 1; while ((ch = getopt(argc, argv, "b:c:dfm:npy")) != -1) {