From: Eric Andersen Date: Tue, 22 Jul 2003 10:11:27 +0000 (-0000) Subject: Remove the update utility, that is only relevant to older 2.0.x kernels X-Git-Tag: 1_00_pre2~46 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=a501d0f01fa9e5ec10809c5a150250b0d24cc4d6;p=oweals%2Fbusybox.git Remove the update utility, that is only relevant to older 2.0.x kernels that are no longer supported. --- diff --git a/docs/busybox_header.pod b/docs/busybox_header.pod index f2c700573..944bd48fa 100644 --- a/docs/busybox_header.pod +++ b/docs/busybox_header.pod @@ -62,8 +62,8 @@ Currently defined functions include: dpkg-deb, du, dumpkmap, dumpleases, dutmp, echo, egrep, env, expr, false, fbset, fdflush, fdformat, fgrep, find, fold, free, freeramdisk, fsck.minix, ftpget, ftpput, getopt, getty, grep, gunzip, gzip, - halt, head, hexdump, hostid, hostname, httpd, hush, hwclock, id, - ifconfig, ifdown, ifup, inetd, init, insmod, ip, ipcalc, iplink, + halt, hdparm, head, hexdump, hostid, hostname, httpd, hush, hwclock, + id, ifconfig, ifdown, ifup, inetd, init, insmod, ip, ipcalc, iplink, iproute, iptunnel, kill, killall, klogd, lash, length, linuxrc, ln, loadacm, loadfont, loadkmap, logger, login, logname, logread, losetup, ls, lsmod, makedevs, md5sum, mesg, minit, mkdir, mkfifo, @@ -75,7 +75,7 @@ Currently defined functions include: sha1sum, sleep, sort, start-stop-daemon, strings, stty, su, sulogin, swapoff, swapon, sync, syslogd, tail, tar, tee, telnet, telnetd, test, tftp, time, top, touch, tr, traceroute, true, tty, udhcpc, - udhcpd, umount, uname, uncompress, uniq, unix2dos, unzip, update, + udhcpd, umount, uname, uncompress, uniq, unix2dos, unzip, uptime, usleep, uudecode, uuencode, vconfig, vi, vlock, watch, watchdog, wc, wget, which, who, whoami, xargs, yes, zcat, [ diff --git a/include/applets.h b/include/applets.h index d01ab2d74..2ee816465 100644 --- a/include/applets.h +++ b/include/applets.h @@ -613,9 +613,6 @@ #ifdef CONFIG_UNZIP APPLET(unzip, unzip_main, _BB_DIR_USR_BIN, _BB_SUID_NEVER) #endif -#ifdef CONFIG_UPDATE - APPLET(update, update_main, _BB_DIR_SBIN, _BB_SUID_NEVER) -#endif #ifdef CONFIG_UPTIME APPLET(uptime, uptime_main, _BB_DIR_USR_BIN, _BB_SUID_NEVER) #endif diff --git a/include/usage.h b/include/usage.h index bf1ad949e..5b7db4150 100644 --- a/include/usage.h +++ b/include/usage.h @@ -2533,15 +2533,6 @@ "\t-x\texclude these files\n" \ "\t-d\textract files into this directory" -#define update_trivial_usage \ - "[options]" -#define update_full_usage \ - "Periodically flushes filesystem buffers.\n\n" \ - "Options:\n" \ - "\t-S\tforce use of sync(2) instead of flushing\n" \ - "\t-s SECS\tcall sync this often (default 30)\n" \ - "\t-f SECS\tflush some buffers this often (default 5)" - #define uptime_trivial_usage \ "" #define uptime_full_usage \ diff --git a/miscutils/Makefile.in b/miscutils/Makefile.in index 0ef96f0cd..0f200f4fb 100644 --- a/miscutils/Makefile.in +++ b/miscutils/Makefile.in @@ -34,7 +34,6 @@ MISCUTILS-$(CONFIG_MAKEDEVS) += makedevs.o MISCUTILS-$(CONFIG_MT) += mt.o MISCUTILS-$(CONFIG_STRINGS) += strings.o MISCUTILS-$(CONFIG_TIME) += time.o -MISCUTILS-$(CONFIG_UPDATE) += update.o MISCUTILS-$(CONFIG_WATCHDOG) += watchdog.o libraries-y+=$(MISCUTILS_DIR)$(MISCUTILS_AR) diff --git a/miscutils/update.c b/miscutils/update.c deleted file mode 100644 index c51f42183..000000000 --- a/miscutils/update.c +++ /dev/null @@ -1,107 +0,0 @@ -/* vi: set sw=4 ts=4: */ -/* - * Mini update implementation for busybox; much pasted from update-2.11 - * - * - * Copyright (C) 1995, 1996 by Bruce Perens . - * Copyright (c) 1996, 1997, 1999 Torsten Poulin. - * Copyright (c) 2000 by Karl M. Hegbloom - * - * 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 of the License, 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - */ - -/* - * Note: This program is only necessary if you are running a 2.0.x (or - * earlier) kernel. 2.2.x and higher flush filesystem buffers automatically. - */ - -#include -#include -#include /* for getopt() */ -#include -#include - -#include "busybox.h" - -static unsigned int sync_duration = 30; -static unsigned int flush_duration = 5; -static int use_sync = 0; - -extern int update_main(int argc, char **argv) -{ - int pid; - int opt; - - while ((opt = getopt(argc, argv, "Ss:f:")) > 0) { - switch (opt) { - case 'S': - use_sync = 1; - break; - case 's': - sync_duration = atoi(optarg); - break; - case 'f': - flush_duration = atoi(optarg); - break; - default: - bb_show_usage(); - } - } - - if (daemon(0, 1) < 0) - bb_perror_msg_and_die("daemon"); - -#ifdef OPEN_MAX - for (pid = 0; pid < OPEN_MAX; pid++) close(pid); -#else - /* glibc 2.1.92 requires using sysconf(_SC_OPEN_MAX) */ - for (pid = 0; pid < sysconf(_SC_OPEN_MAX); pid++) close(pid); -#endif - - /* This is no longer necessary since 1.3.5x, but it will harmlessly - * exit if that is the case. - */ - - /* set the program name that will show up in a 'ps' listing */ - argv[0] = "bdflush (update)"; - argv[1] = NULL; - argv[2] = NULL; - for (;;) { - if (use_sync) { - sleep(sync_duration); - sync(); - } else { - sleep(flush_duration); - if (bdflush(1, 0) < 0) { - openlog("update", LOG_CONS, LOG_DAEMON); - syslog(LOG_INFO, - "This kernel does not need update(8). Exiting."); - closelog(); - return EXIT_SUCCESS; - } - } - } - - return EXIT_SUCCESS; -} - -/* -Local Variables: -c-file-style: "linux" -c-basic-offset: 4 -tab-width: 4 -End: -*/