arch: remove the command, deprecated since 2.13, use coreutils version
Signed-off-by: Karel Zak <kzak@redhat.com>
This commit is contained in:
parent
426f0ceac7
commit
27abd80948
|
@ -62,14 +62,6 @@ Why: useless for kernel >= 2.6.9
|
|||
|
||||
---------------------------
|
||||
|
||||
What: arch(1) command
|
||||
Why: deprecated in favor of uname(1) or arch(1) from coreutils
|
||||
|
||||
The arch(1) has been added (during 2.13 development cycle) to coreutils
|
||||
where it will be maintained as an alias for uname(1) command.
|
||||
|
||||
----------------------------
|
||||
|
||||
What: last(1)
|
||||
Why: nobody uses this implementation
|
||||
|
||||
|
|
10
configure.ac
10
configure.ac
|
@ -683,7 +683,6 @@ AC_ARG_ENABLE([most-builds],
|
|||
[], enable_most_builds=no
|
||||
)
|
||||
if test "x$enable_most_builds" = xyes; then
|
||||
enable_arch=check
|
||||
enable_chfn_chsh=yes
|
||||
enable_chkdupexe=yes
|
||||
enable_elvtune=check
|
||||
|
@ -904,15 +903,6 @@ UL_REQUIRES_HAVE([setpriv], [cap_ng], [libcap-ng])
|
|||
AM_CONDITIONAL(BUILD_SETPRIV, test "x$build_setpriv" = xyes)
|
||||
|
||||
|
||||
AC_ARG_ENABLE([arch],
|
||||
AS_HELP_STRING([--enable-arch], [do build arch]),
|
||||
[], enable_arch=no
|
||||
)
|
||||
UL_BUILD_INIT([arch])
|
||||
UL_REQUIRES_LINUX([arch])
|
||||
AM_CONDITIONAL(BUILD_ARCH, test "x$build_arch" = xyes)
|
||||
|
||||
|
||||
AC_ARG_ENABLE([eject],
|
||||
AS_HELP_STRING([--disable-eject], [do not build eject]),
|
||||
[], enable_eject=check
|
||||
|
|
|
@ -297,12 +297,6 @@ nsenter_SOURCES = sys-utils/nsenter.c
|
|||
nsenter_LDADD = $(LDADD) libcommon.la
|
||||
endif
|
||||
|
||||
if BUILD_ARCH
|
||||
bin_PROGRAMS += arch
|
||||
dist_man_MANS += sys-utils/arch.1
|
||||
arch_SOURCES = sys-utils/arch.c
|
||||
endif
|
||||
|
||||
if BUILD_HWCLOCK
|
||||
sbin_PROGRAMS += hwclock
|
||||
dist_man_MANS += sys-utils/hwclock.8
|
||||
|
|
|
@ -1,40 +0,0 @@
|
|||
.\" arch.1 --
|
||||
.\" Copyright 1993 Rickard E. Faith (faith@cs.unc.edu)
|
||||
.\" Public domain: may be freely distributed.
|
||||
.TH ARCH 1 "July 1997" "util-linux" "User Commands"
|
||||
.SH NAME
|
||||
arch \- print machine architecture
|
||||
.SH SYNOPSIS
|
||||
.B arch
|
||||
.SH DESCRIPTION
|
||||
.B arch
|
||||
is a deprecated command since util-linux 2.13. Use
|
||||
.B "uname -m"
|
||||
or use
|
||||
.B arch
|
||||
from the GNU 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 package and is available from
|
||||
ftp://ftp.kernel.org/pub/linux/utils/util-linux/.
|
||||
.\"
|
||||
.\" 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)
|
|
@ -1,84 +0,0 @@
|
|||
/* 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.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*/
|
||||
|
||||
/*
|
||||
* This command is deprecated. The utility is in maintenance mode,
|
||||
* meaning we keep them in source tree for backward compatibility
|
||||
* only. Do not waste time making this command better, unless the
|
||||
* fix is about security or other very critical issue.
|
||||
*
|
||||
* See Documentation/deprecated.txt for more information.
|
||||
*/
|
||||
|
||||
#include <err.h>
|
||||
#include <errno.h>
|
||||
#include <getopt.h>
|
||||
#include <stdio.h>
|
||||
#include <sys/utsname.h>
|
||||
|
||||
#include "c.h"
|
||||
#include "closestream.h"
|
||||
#include "nls.h"
|
||||
|
||||
static void __attribute__ ((__noreturn__)) usage(FILE * out)
|
||||
{
|
||||
fprintf(out, USAGE_HEADER);
|
||||
/* Synopsis */
|
||||
fprintf(out, _(" %s [options]\n"), program_invocation_short_name);
|
||||
fprintf(out, USAGE_OPTIONS);
|
||||
fprintf(out, USAGE_HELP);
|
||||
fprintf(out, USAGE_VERSION);
|
||||
fprintf(out, USAGE_MAN_TAIL("arch(1)"));
|
||||
exit(out == stderr ? EXIT_FAILURE : EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
struct utsname utsbuf;
|
||||
int ch;
|
||||
static const struct option longopts[] = {
|
||||
{"version", no_argument, NULL, 'V'},
|
||||
{"help", no_argument, NULL, 'h'},
|
||||
{NULL, 0, NULL, 0}
|
||||
};
|
||||
|
||||
setlocale(LC_ALL, "");
|
||||
bindtextdomain(PACKAGE, LOCALEDIR);
|
||||
textdomain(PACKAGE);
|
||||
atexit(close_stdout);
|
||||
|
||||
while ((ch = getopt_long(argc, argv, "Vh", longopts, NULL)) != -1)
|
||||
switch (ch) {
|
||||
case 'V':
|
||||
printf(UTIL_LINUX_VERSION);
|
||||
return EXIT_SUCCESS;
|
||||
case 'h':
|
||||
usage(stdout);
|
||||
default:
|
||||
usage(stderr);
|
||||
}
|
||||
|
||||
if (uname(&utsbuf))
|
||||
err(EXIT_FAILURE, _("uname failed"));
|
||||
|
||||
printf("%s\n", utsbuf.machine);
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
}
|
Loading…
Reference in New Issue