summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortholo <tholo@openbsd.org>1996-06-23 04:22:35 +0000
committertholo <tholo@openbsd.org>1996-06-23 04:22:35 +0000
commit123870bc788295e303aeb5c660620befb0e70df3 (patch)
tree6ff284031c7149b2e5c52fea41806b1bc359d52b
parentPica bus support added (diff)
downloadwireguard-openbsd-123870bc788295e303aeb5c660620befb0e70df3.tar.xz
wireguard-openbsd-123870bc788295e303aeb5c660620befb0e70df3.zip
Add arch(1)
-rw-r--r--usr.bin/Makefile8
-rw-r--r--usr.bin/arch/Makefile5
-rw-r--r--usr.bin/arch/arch.149
-rw-r--r--usr.bin/arch/arch.c44
4 files changed, 102 insertions, 4 deletions
diff --git a/usr.bin/Makefile b/usr.bin/Makefile
index 402bca0a7a4..4899fd60f86 100644
--- a/usr.bin/Makefile
+++ b/usr.bin/Makefile
@@ -1,10 +1,10 @@
-# $OpenBSD: Makefile,v 1.9 1996/06/17 02:14:15 downsj Exp $
+# $OpenBSD: Makefile,v 1.10 1996/06/23 04:22:35 tholo Exp $
# $NetBSD: Makefile,v 1.62 1996/03/10 05:45:43 thorpej Exp $
# from: @(#)Makefile 5.8.1.1 (Berkeley) 5/8/91
-SUBDIR= apply apropos asa at banner basename bdes biff cal calendar cap_mkdb \
- checknr chflags chpass cksum cmp col colcrt colrm column comm \
- compress cpp crontab ctags cut dirname du \
+SUBDIR= apply apropos arch asa at banner basename bdes biff cal calendar \
+ cap_mkdb checknr chflags chpass cksum cmp col colcrt colrm column \
+ comm compress cpp crontab ctags cut dirname du \
env error expand false file find finger fmt fold fpr from \
fsplit fstat ftp gencat getconf getopt head hexdump id indent \
ipcrm ipcs join jot kdump ktrace lam last lastcomm leave less lex \
diff --git a/usr.bin/arch/Makefile b/usr.bin/arch/Makefile
new file mode 100644
index 00000000000..9894397842d
--- /dev/null
+++ b/usr.bin/arch/Makefile
@@ -0,0 +1,5 @@
+# $OpenBSD: Makefile,v 1.1 1996/06/23 04:22:36 tholo Exp $
+
+PROG= arch
+
+.include <bsd.prog.mk>
diff --git a/usr.bin/arch/arch.1 b/usr.bin/arch/arch.1
new file mode 100644
index 00000000000..7e71d88f56c
--- /dev/null
+++ b/usr.bin/arch/arch.1
@@ -0,0 +1,49 @@
+.\" Copyright (c) 1994 SigmaSoft, Th. Lockert
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. All advertising materials mentioning features or use of this software
+.\" must display the following acknowledgement:
+.\" This product includes software developed by SigmaSoft, Th. Lockert.
+.\" 4. The name of the author may not be used to endorse or promote products
+.\" derived from this software without specific prior written permission
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $OpenBSD: arch.1,v 1.1 1996/06/23 04:22:36 tholo Exp $
+.\"
+.Dd June 22, 1996
+.Dt ARCH 1
+.Os
+.Sh NAME
+.Nm arch
+.Nd print architecture type
+.Sh SYNOPSIS
+.Nm arch
+.Sh DESCRIPTION
+The
+.Nm arch
+command displays the machine's architecture type.
+.Sh SEE ALSO
+.Xr machine 1
+.Sh HISTORY
+The
+.Nm arch
+command is
+.Ud .
diff --git a/usr.bin/arch/arch.c b/usr.bin/arch/arch.c
new file mode 100644
index 00000000000..a4a9bee8b31
--- /dev/null
+++ b/usr.bin/arch/arch.c
@@ -0,0 +1,44 @@
+/*
+ * Copyright (c) 1994 SigmaSoft, Th. Lockert <tholo@sigmasoft.com>
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by SigmaSoft, Th. Lockert.
+ * 4. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+ * THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+ * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef lint
+static char rcsid[] = "$OpenBSD: arch.c,v 1.1 1996/06/23 04:22:36 tholo Exp $";
+#endif /* not lint */
+
+#include <sys/param.h>
+
+int
+main(argc, argv)
+ int argc;
+ char *argv[];
+{
+ puts(MACHINE_ARCH);
+ exit(0);
+}