diff options
author | 2015-11-11 19:05:28 +0000 | |
---|---|---|
committer | 2015-11-11 19:05:28 +0000 | |
commit | 53b29436afcfcb0fc1be1802f9eae383d10e0fb6 (patch) | |
tree | 8c64632dcaae987b8a8ab75710e269d10ca0eeba | |
parent | Convert and enable CMS manuals. (diff) | |
download | wireguard-openbsd-53b29436afcfcb0fc1be1802f9eae383d10e0fb6.tar.xz wireguard-openbsd-53b29436afcfcb0fc1be1802f9eae383d10e0fb6.zip |
Switch back to C versions of true/false. I do not accept any of the
arguments made 20 years ago. A small elf binary is smaller and faster
than a large elf binary running a script. Noone cares about the file
sizes on disk.
ok semarie millert aja
-rw-r--r-- | usr.bin/false/Makefile | 7 | ||||
-rw-r--r-- | usr.bin/false/false.c | 9 | ||||
-rw-r--r-- | usr.bin/false/false.sh | 4 | ||||
-rw-r--r-- | usr.bin/true/Makefile | 7 | ||||
-rw-r--r-- | usr.bin/true/true.c | 9 | ||||
-rw-r--r-- | usr.bin/true/true.sh | 4 |
6 files changed, 22 insertions, 18 deletions
diff --git a/usr.bin/false/Makefile b/usr.bin/false/Makefile index 74ee728e795..d4cbe11f243 100644 --- a/usr.bin/false/Makefile +++ b/usr.bin/false/Makefile @@ -1,9 +1,6 @@ -# $OpenBSD: Makefile,v 1.4 1997/04/27 20:56:42 millert Exp $ +# $OpenBSD: Makefile,v 1.5 2015/11/11 19:05:28 deraadt Exp $ MAN= false.1 - -beforeinstall: - ${INSTALL} ${INSTALL_COPY} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \ - ${.CURDIR}/false.sh ${DESTDIR}${BINDIR}/false +PROG= false .include <bsd.prog.mk> diff --git a/usr.bin/false/false.c b/usr.bin/false/false.c new file mode 100644 index 00000000000..240f4bd42dd --- /dev/null +++ b/usr.bin/false/false.c @@ -0,0 +1,9 @@ +/* $OpenBSD: false.c,v 1.1 2015/11/11 19:05:28 deraadt Exp $ */ + +/* Public domain - Theo de Raadt */ + +int +main(int argc, char *argv[]) +{ + return (1); +} diff --git a/usr.bin/false/false.sh b/usr.bin/false/false.sh deleted file mode 100644 index ddd775bdb8d..00000000000 --- a/usr.bin/false/false.sh +++ /dev/null @@ -1,4 +0,0 @@ -#! /bin/sh -# $OpenBSD: false.sh,v 1.2 1996/06/26 05:32:50 deraadt Exp $ - -exit 1 diff --git a/usr.bin/true/Makefile b/usr.bin/true/Makefile index 962df73ee38..6e3466d8443 100644 --- a/usr.bin/true/Makefile +++ b/usr.bin/true/Makefile @@ -1,9 +1,6 @@ -# $OpenBSD: Makefile,v 1.4 1997/04/27 20:56:55 millert Exp $ +# $OpenBSD: Makefile,v 1.5 2015/11/11 19:05:28 deraadt Exp $ MAN= true.1 - -beforeinstall: - ${INSTALL} ${INSTALL_COPY} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \ - ${.CURDIR}/true.sh ${DESTDIR}${BINDIR}/true +PROG= true .include <bsd.prog.mk> diff --git a/usr.bin/true/true.c b/usr.bin/true/true.c new file mode 100644 index 00000000000..a27b589e820 --- /dev/null +++ b/usr.bin/true/true.c @@ -0,0 +1,9 @@ +/* $OpenBSD: true.c,v 1.1 2015/11/11 19:05:28 deraadt Exp $ */ + +/* Public domain - Theo de Raadt */ + +int +main(int argc, char *argv[]) +{ + return (0); +} diff --git a/usr.bin/true/true.sh b/usr.bin/true/true.sh deleted file mode 100644 index ad0c82ca4a0..00000000000 --- a/usr.bin/true/true.sh +++ /dev/null @@ -1,4 +0,0 @@ -#! /bin/sh -# $OpenBSD: true.sh,v 1.2 1996/06/26 05:41:53 deraadt Exp $ - -exit 0 |