From feb27893326f6740b1e2b7af592319127df26aec Mon Sep 17 00:00:00 2001 From: Geoff Keating Date: Tue, 24 Oct 2000 21:12:01 +0000 Subject: * io/test-lfs.c (do_prepare): Call setrlimit64, in case the user has a limit set---for instance, a limit of 2^31 bytes, which can't easily be reset by non-LFS-aware shells. 2000-10-24 Geoffrey Keating * io/test-lfs.c (do_prepare): Call setrlimit64, in case the user has a limit set---for instance, a limit of 2^31 bytes, which can't easily be reset by non-LFS-aware shells. --- ChangeLog | 6 +++++- io/test-lfs.c | 6 ++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index e96abac..364279e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,8 @@ -2000-10-21 Geoffrey Keating +2000-10-24 Geoffrey Keating + + * io/test-lfs.c (do_prepare): Call setrlimit64, in case the user + has a limit set---for instance, a limit of 2^31 bytes, which can't + easily be reset by non-LFS-aware shells. * sysdeps/unix/sysv/linux/powerpc/mmap64.c: Define PAGE_SHIFT explicitly rather than getting it from . diff --git a/io/test-lfs.c b/io/test-lfs.c index f73e67e..16b2be9 100644 --- a/io/test-lfs.c +++ b/io/test-lfs.c @@ -24,6 +24,7 @@ #include #include #include +#include /* Prototype for our test function. */ extern void do_prepare (int argc, char *argv[]); @@ -70,6 +71,11 @@ do_prepare (int argc, char *argv[]) if (fd == -1) error (EXIT_FAILURE, errno, "cannot open test file `%s'", name); + + if (setrlimit64 (RLIMIT_FSIZE, &((const struct rlimit64) + { RLIM_INFINITY, RLIM_INFINITY })) + == -1) + error (EXIT_FAILURE, errno, "cannot reset file size limits"); } int -- cgit v1.1