Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 4 Jun 2011 15:05:52 +0000 (UTC)
From:      Jilles Tjoelker <jilles@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r222684 - in head: bin/sh tools/regression/bin/sh/builtins
Message-ID:  <201106041505.p54F5qLO014827@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jilles
Date: Sat Jun  4 15:05:52 2011
New Revision: 222684
URL: http://svn.freebsd.org/changeset/base/222684

Log:
  sh: Reduce more needless differences between error messages.

Modified:
  head/bin/sh/alias.c
  head/bin/sh/input.c
  head/bin/sh/jobs.c
  head/bin/sh/main.c
  head/tools/regression/bin/sh/builtins/alias.1.stderr

Modified: head/bin/sh/alias.c
==============================================================================
--- head/bin/sh/alias.c	Sat Jun  4 15:05:32 2011	(r222683)
+++ head/bin/sh/alias.c	Sat Jun  4 15:05:52 2011	(r222684)
@@ -238,7 +238,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);

Modified: head/bin/sh/input.c
==============================================================================
--- head/bin/sh/input.c	Sat Jun  4 15:05:32 2011	(r222683)
+++ head/bin/sh/input.c	Sat Jun  4 15:05:52 2011	(r222684)
@@ -403,7 +403,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);

Modified: head/bin/sh/jobs.c
==============================================================================
--- head/bin/sh/jobs.c	Sat Jun  4 15:05:32 2011	(r222683)
+++ head/bin/sh/jobs.c	Sat Jun  4 15:05:52 2011	(r222684)
@@ -820,7 +820,7 @@ forkshell(struct job *jp, union node *n,
 			    ! 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));
 			}
 		}
@@ -832,7 +832,7 @@ forkshell(struct job *jp, union node *n,
 			    ! 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));
 			}
 		}

Modified: head/bin/sh/main.c
==============================================================================
--- head/bin/sh/main.c	Sat Jun  4 15:05:32 2011	(r222683)
+++ head/bin/sh/main.c	Sat Jun  4 15:05:52 2011	(r222684)
@@ -264,7 +264,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();

Modified: head/tools/regression/bin/sh/builtins/alias.1.stderr
==============================================================================
--- head/tools/regression/bin/sh/builtins/alias.1.stderr	Sat Jun  4 15:05:32 2011	(r222683)
+++ head/tools/regression/bin/sh/builtins/alias.1.stderr	Sat Jun  4 15:05:52 2011	(r222684)
@@ -1 +1 @@
-alias: foo not found
+alias: foo: not found



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201106041505.p54F5qLO014827>