summaryrefslogtreecommitdiffstats
path: root/sbin/fsck_ifs
diff options
context:
space:
mode:
authormjacob <mjacob@FreeBSD.org>1998-11-05 03:26:36 +0000
committermjacob <mjacob@FreeBSD.org>1998-11-05 03:26:36 +0000
commit33cd29fe0d93dc32c436f08871a62756699767f9 (patch)
treeaab852431ce0dbc4f7d36850db67854063b8c7ee /sbin/fsck_ifs
parent01ef1d063958e082f3550b58fa19c620918eed53 (diff)
downloadFreeBSD-src-33cd29fe0d93dc32c436f08871a62756699767f9.zip
FreeBSD-src-33cd29fe0d93dc32c436f08871a62756699767f9.tar.gz
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
Diffstat (limited to 'sbin/fsck_ifs')
-rw-r--r--sbin/fsck_ifs/main.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/sbin/fsck_ifs/main.c b/sbin/fsck_ifs/main.c
index 9ff947c..317015b 100644
--- a/sbin/fsck_ifs/main.c
+++ b/sbin/fsck_ifs/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 <sys/param.h>
#include <sys/time.h>
#include <sys/mount.h>
+#include <sys/resource.h>
#include <ufs/ufs/dinode.h>
#include <ufs/ufs/ufsmount.h>
@@ -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) {
OpenPOWER on IntegriCloud