]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
arch: remove the command, deprecated since 2.13, use coreutils version
authorKarel Zak <kzak@redhat.com>
Thu, 14 Mar 2013 11:22:11 +0000 (12:22 +0100)
committerKarel Zak <kzak@redhat.com>
Thu, 14 Mar 2013 11:22:11 +0000 (12:22 +0100)
Signed-off-by: Karel Zak <kzak@redhat.com>
Documentation/deprecated.txt
configure.ac
sys-utils/Makemodule.am
sys-utils/arch.1 [deleted file]
sys-utils/arch.c [deleted file]

index d9e8e24223f3f732926fcdfc011273be6772dd97..b4f9983a2cde88f57652e5c575f4e472f08dfbda 100644 (file)
@@ -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
 
index d11cf11f6b2bf7f3247e7382a8477ff8ecd112c8..f74208ffd6f0eb8b9606eca3c36b7284b2b38dd8 100644 (file)
@@ -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
index c214b927e4607dc395358b5b7f1cc56b781745f1..44b471289af38852859934bbad8daf867ebd5752 100644 (file)
@@ -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
diff --git a/sys-utils/arch.1 b/sys-utils/arch.1
deleted file mode 100644 (file)
index 96cbc0a..0000000
+++ /dev/null
@@ -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)
diff --git a/sys-utils/arch.c b/sys-utils/arch.c
deleted file mode 100644 (file)
index a730589..0000000
+++ /dev/null
@@ -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;
-}