summary refs log tree commit diff
path: root/Src/Builtins
diff options
context:
space:
mode:
authorStefan Neudorf <BM-2cXppXU4T67w7j6NCir9T1WdzBHmFgBnLj@bitmessage.ch>2013-11-01 00:09:04 +0100
committerPeter Stephenson <p.w.stephenson@ntlworld.com>2013-11-03 19:47:00 +0000
commit93dec3a96a38141c6176eb07d51c59f0ab15d151 (patch)
tree4afca0f6dc415c67c4ed9255072547ba5d95d401 /Src/Builtins
parent790a4fee2b498a80b43605d64f4c81f01501b727 (diff)
downloadzsh-93dec3a96a38141c6176eb07d51c59f0ab15d151.tar.gz
zsh-93dec3a96a38141c6176eb07d51c59f0ab15d151.tar.xz
zsh-93dec3a96a38141c6176eb07d51c59f0ab15d151.zip
31935: further updates to limits for BSD
Diffstat (limited to 'Src/Builtins')
-rw-r--r--Src/Builtins/rlimits.awk2
-rw-r--r--Src/Builtins/rlimits.c17
2 files changed, 6 insertions, 13 deletions
diff --git a/Src/Builtins/rlimits.awk b/Src/Builtins/rlimits.awk
index ccee49e87..b5a25fd83 100644
--- a/Src/Builtins/rlimits.awk
+++ b/Src/Builtins/rlimits.awk
@@ -57,7 +57,7 @@ BEGIN {limidx = 0}
 	    if (limnam == "RTTIME") { msg[limnum] = "Urt_time" }
 	    if (limnam == "POSIXLOCKS") { msg[limnum] = "Nposixlocks" }
 	    if (limnam == "NPTS")    { msg[limnum] = "Npseudoterminals" }
-	    if (limnam == "SWAP")    { msg[limnum] = "Mswapuse" }
+	    if (limnam == "SWAP")    { msg[limnum] = "Mswapsize" }
 	    if (limnam == "KQUEUES") { msg[limnum] = "Nkqueues" }
         }
     }
diff --git a/Src/Builtins/rlimits.c b/Src/Builtins/rlimits.c
index a0f294876..e48a1d3e3 100644
--- a/Src/Builtins/rlimits.c
+++ b/Src/Builtins/rlimits.c
@@ -32,6 +32,10 @@
 
 #if defined(HAVE_GETRLIMIT) && defined(RLIM_INFINITY)
 
+#ifdef RLIMIT_POSIXLOCKS
+#  define RLIMIT_LOCKS		RLIMIT_POSIXLOCKS
+#endif
+
 enum {
     ZLIMTYPE_MEMORY,
     ZLIMTYPE_NUMBER,
@@ -386,12 +390,6 @@ printulimit(char *nam, int lim, int hard, int head)
 	    printf("-r: max rt priority                 ");
 	break;
 # endif /* HAVE_RLIMIT_RTPRIO */
-# ifdef HAVE_RLIMIT_POSIXLOCKS
-    case RLIMIT_POSIXLOCKS:
-	if (head)
-	    printf("-K: posixlocks                      ");
-	break;
-# endif /* HAVE_RLIMIT_POSIXLOCKS */
 # ifdef HAVE_RLIMIT_NPTS
     case RLIMIT_NPTS:
 	if (head)
@@ -401,7 +399,7 @@ printulimit(char *nam, int lim, int hard, int head)
 # ifdef HAVE_RLIMIT_SWAP
     case RLIMIT_SWAP:
 	if (head)
-	    printf("-w: swap limit (kbytes)             ");
+	    printf("-w: swap size (kbytes)              ");
 	if (limit != RLIM_INFINITY)
 	    limit /= 1024;
 	break;
@@ -870,11 +868,6 @@ bin_ulimit(char *name, char **argv, UNUSED(Options ops), UNUSED(int func))
 		    res = RLIMIT_RTPRIO;
 		    break;
 # endif
-# ifdef HAVE_RLIMIT_POSIXLOCKS
-		case 'K':
-		    res = RLIMIT_POSIXLOCKS;
-		    break;
-# endif
 # ifdef HAVE_RLIMIT_NPTS
 		case 'p':
 		    res = RLIMIT_NPTS;