diff options
author | 2011-04-26 14:02:14 +0000 | |
---|---|---|
committer | 2011-04-26 14:02:14 +0000 | |
commit | 64da53821c89ba57e97581182f5f20b84c48a46e (patch) | |
tree | ededc368d38fa22c932b82d61b131c70b8b8a7fe | |
parent | Tweak after x11/gnome MODULE recent change. (diff) | |
download | wireguard-openbsd-64da53821c89ba57e97581182f5f20b84c48a46e.tar.xz wireguard-openbsd-64da53821c89ba57e97581182f5f20b84c48a46e.zip |
setrlimit only if mfs; ok millert@
-rw-r--r-- | sbin/newfs/newfs.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/sbin/newfs/newfs.c b/sbin/newfs/newfs.c index 2e16fb3fa3e..ee8954f4f14 100644 --- a/sbin/newfs/newfs.c +++ b/sbin/newfs/newfs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: newfs.c,v 1.88 2010/12/13 00:02:58 marco Exp $ */ +/* $OpenBSD: newfs.c,v 1.89 2011/04/26 14:02:14 otto Exp $ */ /* $NetBSD: newfs.c,v 1.20 1996/05/16 07:13:03 thorpej Exp $ */ /* @@ -293,10 +293,12 @@ main(int argc, char *argv[]) if (ffsflag && argc - mfs != 1) usage(); - /* Increase our data size to the max */ - if (getrlimit(RLIMIT_DATA, &rl) == 0) { - rl.rlim_cur = rl.rlim_max; - (void)setrlimit(RLIMIT_DATA, &rl); + if (mfs) { + /* Increase our data size to the max */ + if (getrlimit(RLIMIT_DATA, &rl) == 0) { + rl.rlim_cur = rl.rlim_max; + (void)setrlimit(RLIMIT_DATA, &rl); + } } special = argv[0]; |