From f893ef221c0def4584d3c6814725f04a003f242c Mon Sep 17 00:00:00 2001 From: Peter Avalos Date: Sun, 21 Aug 2011 12:58:01 -0700 Subject: [PATCH] sh: Reduce more needless differences between error messages. Obtained-from: FreeBSD 222684 --- bin/sh/alias.c | 4 ++-- bin/sh/input.c | 4 ++-- bin/sh/jobs.c | 6 +++--- bin/sh/main.c | 4 ++-- tools/regression/bin/sh/builtins/alias.1.stderr | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/bin/sh/alias.c b/bin/sh/alias.c index 9fd05376c4..d4b222f9dc 100644 --- a/bin/sh/alias.c +++ b/bin/sh/alias.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)alias.c 8.3 (Berkeley) 5/4/95 - * $FreeBSD: src/bin/sh/alias.c,v 1.30 2011/02/04 22:47:55 jilles Exp $ + * $FreeBSD: src/bin/sh/alias.c,v 1.31 2011/06/04 15:05:52 jilles Exp $ */ #include @@ -237,7 +237,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) { - warning("%s not found", n); + warning("%s: not found", n); ret = 1; } else printalias(ap); diff --git a/bin/sh/input.c b/bin/sh/input.c index 656bc1f4af..2c3908d887 100644 --- a/bin/sh/input.c +++ b/bin/sh/input.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)input.c 8.3 (Berkeley) 6/9/95 - * $FreeBSD: src/bin/sh/input.c,v 1.29 2009/12/27 18:04:05 jilles Exp $ + * $FreeBSD: src/bin/sh/input.c,v 1.33 2011/06/04 15:05:52 jilles Exp $ */ #include /* defines BUFSIZ */ @@ -401,7 +401,7 @@ setinputfile(const char *fname, int push) INTOFF; if ((fd = open(fname, O_RDONLY)) < 0) - error("Can't open %s: %s", fname, strerror(errno)); + error("cannot open %s: %s", fname, strerror(errno)); if (fd < 10) { fd2 = fcntl(fd, F_DUPFD, 10); close(fd); diff --git a/bin/sh/jobs.c b/bin/sh/jobs.c index b679bac91c..ae3bd03896 100644 --- a/bin/sh/jobs.c +++ b/bin/sh/jobs.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)jobs.c 8.5 (Berkeley) 5/4/95 - * $FreeBSD: src/bin/sh/jobs.c,v 1.92 2011/02/04 22:47:55 jilles Exp $ + * $FreeBSD: src/bin/sh/jobs.c,v 1.93 2011/06/04 15:05:52 jilles Exp $ */ #include @@ -819,7 +819,7 @@ forkshell(struct job *jp, union node *n, int mode) ! fd0_redirected_p ()) { close(0); if (open(_PATH_DEVNULL, O_RDONLY) != 0) - error("Can't open %s: %s", + error("cannot open %s: %s", _PATH_DEVNULL, strerror(errno)); } } @@ -831,7 +831,7 @@ forkshell(struct job *jp, union node *n, int mode) ! fd0_redirected_p ()) { close(0); if (open(_PATH_DEVNULL, O_RDONLY) != 0) - error("Can't open %s: %s", + error("cannot open %s: %s", _PATH_DEVNULL, strerror(errno)); } } diff --git a/bin/sh/main.c b/bin/sh/main.c index 6629078903..327335d441 100644 --- a/bin/sh/main.c +++ b/bin/sh/main.c @@ -35,7 +35,7 @@ * * @(#) Copyright (c) 1991, 1993 The Regents of the University of California. All rights reserved. * @(#)main.c 8.6 (Berkeley) 5/28/95 - * $FreeBSD: src/bin/sh/main.c,v 1.48 2011/05/22 12:12:28 jilles Exp $ + * $FreeBSD: src/bin/sh/main.c,v 1.49 2011/06/04 15:05:52 jilles Exp $ */ #include @@ -258,7 +258,7 @@ readcmdfile(const char *name) if ((fd = open(name, O_RDONLY)) >= 0) setinputfd(fd, 1); else - error("Can't open %s: %s", name, strerror(errno)); + error("cannot open %s: %s", name, strerror(errno)); INTON; cmdloop(0); popfile(); diff --git a/tools/regression/bin/sh/builtins/alias.1.stderr b/tools/regression/bin/sh/builtins/alias.1.stderr index 5ea01d55bf..c9f4011bea 100644 --- a/tools/regression/bin/sh/builtins/alias.1.stderr +++ b/tools/regression/bin/sh/builtins/alias.1.stderr @@ -1 +1 @@ -alias: foo not found +alias: foo: not found -- 2.11.4.GIT