diff options
author | jilles <jilles@FreeBSD.org> | 2010-12-21 20:47:06 +0000 |
---|---|---|
committer | jilles <jilles@FreeBSD.org> | 2010-12-21 20:47:06 +0000 |
commit | eb00352e45c46febb8e2b0df1a048451d79de792 (patch) | |
tree | 9100639c6e991583a424211610f1fda83edfd6a2 /bin/sh/alias.c | |
parent | da7284d25303e2c3a5c54e86ebdd14fd514eb5f9 (diff) | |
download | FreeBSD-src-eb00352e45c46febb8e2b0df1a048451d79de792.zip FreeBSD-src-eb00352e45c46febb8e2b0df1a048451d79de792.tar.gz |
sh: Add a function to print warnings (with command name and newline).
This is like error() but without raising an exception.
It is particularly useful as a replacement for the warnx macro in
bltin/bltin.h.
Diffstat (limited to 'bin/sh/alias.c')
-rw-r--r-- | bin/sh/alias.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/sh/alias.c b/bin/sh/alias.c index c815b92..0b7e31a 100644 --- a/bin/sh/alias.c +++ b/bin/sh/alias.c @@ -246,7 +246,7 @@ aliascmd(int argc, char **argv) while ((n = *++argv) != NULL) { if ((v = strchr(n+1, '=')) == NULL) /* n+1: funny ksh stuff */ if ((ap = lookupalias(n, 0)) == NULL) { - outfmt(out2, "alias: %s not found\n", n); + warning("%s not found", n); ret = 1; } else printalias(ap); |