diff options
author | tjr <tjr@FreeBSD.org> | 2002-09-30 13:29:32 +0000 |
---|---|---|
committer | tjr <tjr@FreeBSD.org> | 2002-09-30 13:29:32 +0000 |
commit | de4d764c3ced9493f45d5dc351fab3dbe4ecfbdb (patch) | |
tree | 15a3fc2f31df9de58d6a784fca04e2153136c8ae | |
parent | be381197cdcf5d7ce025ab36cad95e0a5f88ee0c (diff) | |
download | FreeBSD-src-de4d764c3ced9493f45d5dc351fab3dbe4ecfbdb.zip FreeBSD-src-de4d764c3ced9493f45d5dc351fab3dbe4ecfbdb.tar.gz |
Callers of error() don't need to supply a program name prefix in the
error message. Stops ulimit giving error messages like "ulimit: ulimit: xyz".
-rw-r--r-- | bin/sh/miscbltin.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/bin/sh/miscbltin.c b/bin/sh/miscbltin.c index 2b7ab9c..26e7fcb 100644 --- a/bin/sh/miscbltin.c +++ b/bin/sh/miscbltin.c @@ -379,14 +379,14 @@ ulimitcmd(int argc __unused, char **argv __unused) for (l = limits; l->name && l->option != what; l++) ; if (!l->name) - error("ulimit: internal error (%c)", what); + error("internal error (%c)", what); set = *argptr ? 1 : 0; if (set) { char *p = *argptr; if (all || argptr[1]) - error("ulimit: too many arguments"); + error("too many arguments"); if (strcmp(p, "unlimited") == 0) val = RLIM_INFINITY; else { @@ -399,7 +399,7 @@ ulimitcmd(int argc __unused, char **argv __unused) break; } if (c) - error("ulimit: bad number"); + error("bad number"); val *= l->factor; } } @@ -407,7 +407,7 @@ ulimitcmd(int argc __unused, char **argv __unused) for (l = limits; l->name; l++) { char optbuf[40]; if (getrlimit(l->cmd, &limit) < 0) - error("ulimit: can't get limit: %s", strerror(errno)); + error("can't get limit: %s", strerror(errno)); if (how & SOFT) val = limit.rlim_cur; else if (how & HARD) @@ -432,14 +432,14 @@ ulimitcmd(int argc __unused, char **argv __unused) } if (getrlimit(l->cmd, &limit) < 0) - error("ulimit: can't get limit: %s", strerror(errno)); + error("can't get limit: %s", strerror(errno)); if (set) { if (how & SOFT) limit.rlim_cur = val; if (how & HARD) limit.rlim_max = val; if (setrlimit(l->cmd, &limit) < 0) - error("ulimit: bad limit: %s", strerror(errno)); + error("bad limit: %s", strerror(errno)); } else { if (how & SOFT) val = limit.rlim_cur; |