summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2013-11-14 15:23:31 +0000
committerMarc Espie <espie@cvs.openbsd.org>2013-11-14 15:23:31 +0000
commit3c000c60529c8aa5b53e9b28f8eb17e9e0c4602d (patch)
tree68d8ddf235cf030a1ef007872c3d618a50412700 /bin
parent8b95c3465fab02432a6e6b38bedf09a8bd96b1e1 (diff)
be more specific in ulimit error messages.
prompted by henning@ okay millert@, krw@, pirofti@
Diffstat (limited to 'bin')
-rw-r--r--bin/ksh/c_ulimit.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/bin/ksh/c_ulimit.c b/bin/ksh/c_ulimit.c
index bf580772a9c..71b0bf067b1 100644
--- a/bin/ksh/c_ulimit.c
+++ b/bin/ksh/c_ulimit.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: c_ulimit.c,v 1.17 2008/03/21 12:51:19 millert Exp $ */
+/* $OpenBSD: c_ulimit.c,v 1.18 2013/11/14 15:23:30 espie Exp $ */
/*
ulimit -- handle "ulimit" builtin
@@ -172,9 +172,10 @@ set_ulimit(const struct limits *l, const char *v, int how)
limit.rlim_max = val;
if (setrlimit(l->resource, &limit) < 0) {
if (errno == EPERM)
- bi_errorf("exceeds allowable limit");
+ bi_errorf("-%c exceeds allowable limit", l->option);
else
- bi_errorf("bad limit: %s", strerror(errno));
+ bi_errorf("bad -%c limit: %s", l->option,
+ strerror(errno));
return 1;
}
return 0;