What: arch(1) command
When: 2.14
-Why: deprecated in favor of uname(1) from coreutils
+Why: deprecated in favor of uname(1) or arch(1) from coreutils
- The arch(1) has been moved (during 2.13 development cycle) to coreutuls
+ The arch(1) has been added (during 2.13 development cycle) to coreutuls
where it will be maintained as an alias for uname(1) command.
----------------------------
UTIL_SET_ARCH(M68K, m68*)
UTIL_SET_ARCH(MIPS, mips*)
+AC_ARG_ENABLE([arch],
+ AS_HELP_STRING([--enable-arch], [do build arch]),
+ [], enable_arch=no
+)
+AM_CONDITIONAL(BUILD_ARCH, test x$enable_arch = xyes)
AC_ARG_ENABLE([agetty],
AS_HELP_STRING([--disable-agetty], [do not build agetty]),
)
AM_CONDITIONAL(BUILD_AGETTY, test x$enable_agetty = xyes)
-
AC_ARG_ENABLE([cramfs],
AS_HELP_STRING([--disable-cramfs], [do not build fsck.cramfs, mkfs.cramfs]),
[], enable_cramfs=check
schedutils/chrt.c
schedutils/ionice.c
schedutils/taskset.c
+sys-utils/arch.c
sys-utils/ctrlaltdel.c
sys-utils/cytune.c
sys-utils/dmesg.c
info_TEXINFOS = ipc.texi
+if BUILD_ARCH
+bin_PROGRAMS += arch
+man_MANS += arch.1
+endif
+
if BUILD_RDEV
if ARCH_I86
usrsbinexec_PROGRAMS += rdev
--- /dev/null
+.\" arch.1 --
+.\" Copyright 1993 Rickard E. Faith (faith@cs.unc.edu)
+.\" Public domain: may be freely distributed.
+.TH ARCH 1 "4 July 1997" "Linux 2.0" "Linux Programmer's Manual"
+.SH NAME
+arch \- print machine architecture
+.SH SYNOPSIS
+.B arch
+.SH DESCRIPTION
+.B arch
+is deprecated command since release util-linux 2.13. Use
+.BR "uname -m"
+or use
+.BR arch
+from the coreutils package.
+
+On current Linux systems,
+.B arch
+prints things such as "i386", "i486", "i586", "alpha", "sparc",
+"arm", "m68k", "mips", "ppc".
+.SH SEE ALSO
+.BR uname (1),
+.BR uname (2)
+.SH AVAILABILITY
+The arch command is part of the util-linux-ng package and is available from
+ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/.
+.\"
+.\" Details:
+.\" arch prints the machine part of the system_utsname struct
+.\" This struct is defined in version.c, and this field is
+.\" initialized with UTS_MACHINE, which is defined as $ARCH
+.\" in the main Makefile.
+.\" That gives the possibilities
+.\" alpha arm i386 m68k mips ppc sparc sparc64
+.\"
+.\" If Makefile is not edited, ARCH is guessed by
+.\" ARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/)
+.\" Then how come we get these i586 values?
+.\" Well, the routine check_bugs() does system_utsname.machine[1] = '0' + x86;
+.\" (called in init/main.c, defined in ./include/asm-i386/bugs.h)
--- /dev/null
+/* arch -- print machine architecture information
+ * Created: Mon Dec 20 12:27:15 1993 by faith@cs.unc.edu
+ * Revised: Mon Dec 20 12:29:23 1993 by faith@cs.unc.edu
+ * Copyright 1993 Rickard E. Faith (faith@cs.unc.edu)
+
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2, or (at your option) any
+ * later version.
+
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 675 Mass Ave, Cambridge, MA 02139, USA. */
+
+#include <stdio.h>
+#include <sys/utsname.h>
+
+int main (void)
+{
+ struct utsname utsbuf;
+
+ if (uname( &utsbuf )) {
+ perror( "arch" );
+ return 1;
+ }
+
+ printf( "%s\n", utsbuf.machine );
+
+ return 0;
+}