summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorknu <knu@FreeBSD.org>2001-11-20 18:33:59 +0000
committerknu <knu@FreeBSD.org>2001-11-20 18:33:59 +0000
commit96265e088e72e2c9130f86ad9be7b15621646f37 (patch)
treeb83cecadf322bae33172651b235b29086676fa5f /bin
parentd6a5097acfb786f3b9c7928ff97121c937d194df (diff)
downloadFreeBSD-src-96265e088e72e2c9130f86ad9be7b15621646f37.zip
FreeBSD-src-96265e088e72e2c9130f86ad9be7b15621646f37.tar.gz
Remove the printf builtin command from sh(1), which command is not
used so often that it's worth keeping it as a builtin. Now that all the printf invocations from within the system startup scripts, we can safely remove it. Urged by: sheldonh :) No MFC is planned so far because it may break compatibility and violate POLA.
Diffstat (limited to 'bin')
-rw-r--r--bin/sh/Makefile5
-rw-r--r--bin/sh/builtins.def2
-rw-r--r--bin/sh/sh.18
3 files changed, 5 insertions, 10 deletions
diff --git a/bin/sh/Makefile b/bin/sh/Makefile
index 14e07ea..64eb0f0 100644
--- a/bin/sh/Makefile
+++ b/bin/sh/Makefile
@@ -4,7 +4,7 @@
PROG= sh
SHSRCS= alias.c arith.y arith_lex.l cd.c echo.c error.c eval.c exec.c expand.c \
histedit.c input.c jobs.c mail.c main.c memalloc.c miscbltin.c \
- mystring.c options.c output.c parser.c printf.c redir.c show.c \
+ mystring.c options.c output.c parser.c redir.c show.c \
test.c trap.c var.c
GENSRCS= builtins.c init.c nodes.c syntax.c
GENHDRS= builtins.h nodes.h syntax.h token.h y.tab.h
@@ -23,8 +23,7 @@ CFLAGS+=-DSHELL -I. -I${.CURDIR}
# CFLAGS+= -g -DDEBUG=2
.PATH: ${.CURDIR}/bltin \
- ${.CURDIR}/../../bin/test \
- ${.CURDIR}/../../usr.bin/printf
+ ${.CURDIR}/../../bin/test
CLEANFILES+= mkinit mkinit.o mknodes mknodes.o \
mksyntax mksyntax.o
diff --git a/bin/sh/builtins.def b/bin/sh/builtins.def
index bd4c1df..f06a98b 100644
--- a/bin/sh/builtins.def
+++ b/bin/sh/builtins.def
@@ -73,7 +73,7 @@ jobscmd jobs
#linecmd line
localcmd local
#nlechocmd nlecho
-printfcmd printf
+#printfcmd printf
pwdcmd pwd
readcmd read
returncmd return
diff --git a/bin/sh/sh.1 b/bin/sh/sh.1
index fe2f3e3..9c8cc34 100644
--- a/bin/sh/sh.1
+++ b/bin/sh/sh.1
@@ -1273,12 +1273,9 @@ make it the first or last character listed.
This section lists the commands which
are builtin because they need to perform some operation
that cannot be performed by a separate process. In addition to
-these, builtin versions of the
-.Xr printf 1
-command and
-the
+these, a builtin version of the
.Xr test 1
-command are provided for efficiency.
+command is provided for efficiency.
.Bl -tag -width Ds
.It Ic \&:
A null command that returns a 0 (true) exit value.
@@ -1945,7 +1942,6 @@ emacs-style command line editing features.
.Xr builtin 1 ,
.Xr echo 1 ,
.Xr expr 1 ,
-.Xr printf 1 ,
.Xr pwd 1 ,
.Xr test 1
.Sh HISTORY
OpenPOWER on IntegriCloud