diff options
author | mbm <mbm@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2004-07-31 07:30:57 +0000 |
---|---|---|
committer | mbm <mbm@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2004-07-31 07:30:57 +0000 |
commit | 1dfdb01703ee80d615586a72d3e8de29d5c9c97e (patch) | |
tree | 917bbbcb8a47bea87b391155c1c0170bf6175f14 /obsolete-buildroot/sources/openwrt/busybox | |
parent | 59c30bc41c97b06995b3285f287bc38a69d36fe5 (diff) |
restructure; cleanup
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@120 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'obsolete-buildroot/sources/openwrt/busybox')
4 files changed, 688 insertions, 0 deletions
diff --git a/obsolete-buildroot/sources/openwrt/busybox/busybox.config b/obsolete-buildroot/sources/openwrt/busybox/busybox.config new file mode 100644 index 000000000..2d7c51fb3 --- /dev/null +++ b/obsolete-buildroot/sources/openwrt/busybox/busybox.config @@ -0,0 +1,459 @@ +# +# Automatically generated make config: don't edit +# +HAVE_DOT_CONFIG=y + +# +# General Configuration +# +# CONFIG_FEATURE_BUFFERS_USE_MALLOC is not set +CONFIG_FEATURE_BUFFERS_GO_ON_STACK=y +# CONFIG_FEATURE_BUFFERS_GO_IN_BSS is not set +CONFIG_FEATURE_VERBOSE_USAGE=y +# CONFIG_FEATURE_INSTALLER is not set +# CONFIG_LOCALE_SUPPORT is not set +CONFIG_FEATURE_DEVFS=y +CONFIG_FEATURE_DEVPTS=y +# CONFIG_FEATURE_CLEAN_UP is not set +# CONFIG_FEATURE_SUID is not set +# CONFIG_SELINUX is not set + +# +# Build Options +# +# CONFIG_STATIC is not set +CONFIG_LFS=y +USING_CROSS_COMPILER=y +CROSS_COMPILER_PREFIX="mipsel-uclibc-" +EXTRA_CFLAGS_OPTIONS="-Os " + +# +# Installation Options +# +# CONFIG_INSTALL_NO_USR is not set +PREFIX="./_install" + +# +# Archival Utilities +# +# CONFIG_AR is not set +CONFIG_BUNZIP2=y +# CONFIG_CPIO is not set +# CONFIG_DPKG is not set +# CONFIG_DPKG_DEB is not set +CONFIG_GUNZIP=y +CONFIG_FEATURE_GUNZIP_UNCOMPRESS=y +CONFIG_GZIP=y +# CONFIG_RPM2CPIO is not set +# CONFIG_RPM is not set +CONFIG_TAR=y +CONFIG_FEATURE_TAR_CREATE=y +CONFIG_FEATURE_TAR_BZIP2=y +# CONFIG_FEATURE_TAR_FROM is not set +CONFIG_FEATURE_TAR_GZIP=y +# CONFIG_FEATURE_TAR_COMPRESS is not set +# CONFIG_FEATURE_TAR_OLDGNU_COMPATABILITY is not set +CONFIG_FEATURE_TAR_GNU_EXTENSIONS=y +# CONFIG_FEATURE_TAR_LONG_OPTIONS is not set +# CONFIG_UNCOMPRESS is not set +# CONFIG_UNZIP is not set + +# +# Common options for cpio and tar +# +# CONFIG_FEATURE_UNARCHIVE_TAPE is not set + +# +# Coreutils +# +CONFIG_BASENAME=y +# CONFIG_CAL is not set +CONFIG_CAT=y +CONFIG_CHGRP=y +CONFIG_CHMOD=y +CONFIG_CHOWN=y +CONFIG_CHROOT=y +# CONFIG_CMP is not set +CONFIG_CP=y +CONFIG_CUT=y +CONFIG_DATE=y +CONFIG_FEATURE_DATE_ISOFMT=y +CONFIG_DD=y +CONFIG_DF=y +# CONFIG_DIRNAME is not set +# CONFIG_DOS2UNIX is not set +# CONFIG_DU is not set +CONFIG_ECHO=y +CONFIG_FEATURE_FANCY_ECHO=y +CONFIG_ENV=y +CONFIG_EXPR=y +CONFIG_FALSE=y +# CONFIG_FOLD is not set +CONFIG_HEAD=y +# CONFIG_FEATURE_FANCY_HEAD is not set +CONFIG_HOSTID=y +# CONFIG_ID is not set +CONFIG_INSTALL=y +CONFIG_LENGTH=y +CONFIG_LN=y +# CONFIG_LOGNAME is not set +CONFIG_LS=y +CONFIG_FEATURE_LS_FILETYPES=y +CONFIG_FEATURE_LS_FOLLOWLINKS=y +CONFIG_FEATURE_LS_RECURSIVE=y +CONFIG_FEATURE_LS_SORTFILES=y +CONFIG_FEATURE_LS_TIMESTAMPS=y +CONFIG_FEATURE_LS_USERNAME=y +CONFIG_FEATURE_LS_COLOR=y +CONFIG_MD5SUM=y +CONFIG_MKDIR=y +CONFIG_MKFIFO=y +# CONFIG_MKNOD is not set +CONFIG_MV=y +# CONFIG_OD is not set +# CONFIG_PRINTF is not set +CONFIG_PWD=y +# CONFIG_REALPATH is not set +CONFIG_RM=y +CONFIG_RMDIR=y +# CONFIG_SEQ is not set +# CONFIG_SHA1SUM is not set +CONFIG_SLEEP=y +CONFIG_FEATURE_FANCY_SLEEP=y +CONFIG_SORT=y +# CONFIG_STTY is not set +CONFIG_SYNC=y +CONFIG_TAIL=y +CONFIG_FEATURE_FANCY_TAIL=y +CONFIG_TEE=y +CONFIG_FEATURE_TEE_USE_BLOCK_IO=y +CONFIG_TEST=y + +# +# test (forced enabled for use with shell) +# +CONFIG_TOUCH=y +# CONFIG_TR is not set +CONFIG_TRUE=y +# CONFIG_TTY is not set +CONFIG_UNAME=y +CONFIG_UNIQ=y +# CONFIG_USLEEP is not set +# CONFIG_UUDECODE is not set +# CONFIG_UUENCODE is not set +# CONFIG_WATCH is not set +CONFIG_WC=y +# CONFIG_WHO is not set +# CONFIG_WHOAMI is not set +CONFIG_YES=y + +# +# Common options for cp and mv +# +CONFIG_FEATURE_PRESERVE_HARDLINKS=y + +# +# Common options for ls and more +# +CONFIG_FEATURE_AUTOWIDTH=y + +# +# Common options for df, du, ls +# +CONFIG_FEATURE_HUMAN_READABLE=y + +# +# Common options for md5sum, sha1sum +# +CONFIG_FEATURE_MD5_SHA1_SUM_CHECK=y + +# +# Console Utilities +# +# CONFIG_CHVT is not set +CONFIG_CLEAR=y +# CONFIG_DEALLOCVT is not set +# CONFIG_DUMPKMAP is not set +# CONFIG_LOADFONT is not set +# CONFIG_LOADKMAP is not set +# CONFIG_OPENVT is not set +CONFIG_RESET=y +# CONFIG_SETKEYCODES is not set + +# +# Debian Utilities +# +CONFIG_MKTEMP=y +# CONFIG_PIPE_PROGRESS is not set +# CONFIG_READLINK is not set +CONFIG_RUN_PARTS=y +# CONFIG_START_STOP_DAEMON is not set +CONFIG_WHICH=y + +# +# Editors +# +CONFIG_AWK=y +CONFIG_FEATURE_AWK_MATH=y +# CONFIG_PATCH is not set +CONFIG_SED=y +CONFIG_VI=y +CONFIG_FEATURE_VI_COLON=y +CONFIG_FEATURE_VI_YANKMARK=y +CONFIG_FEATURE_VI_SEARCH=y +CONFIG_FEATURE_VI_USE_SIGNALS=y +CONFIG_FEATURE_VI_DOT_CMD=y +CONFIG_FEATURE_VI_READONLY=y +CONFIG_FEATURE_VI_SETOPTS=y +CONFIG_FEATURE_VI_SET=y +CONFIG_FEATURE_VI_WIN_RESIZE=y +CONFIG_FEATURE_VI_OPTIMIZE_CURSOR=y + +# +# Finding Utilities +# +CONFIG_FIND=y +# CONFIG_FEATURE_FIND_MTIME is not set +CONFIG_FEATURE_FIND_PERM=y +CONFIG_FEATURE_FIND_TYPE=y +CONFIG_FEATURE_FIND_XDEV=y +# CONFIG_FEATURE_FIND_NEWER is not set +# CONFIG_FEATURE_FIND_INUM is not set +CONFIG_GREP=y +CONFIG_FEATURE_GREP_EGREP_ALIAS=y +CONFIG_FEATURE_GREP_FGREP_ALIAS=y +CONFIG_FEATURE_GREP_CONTEXT=y +CONFIG_XARGS=y +CONFIG_FEATURE_XARGS_SUPPORT_CONFIRMATION=y +CONFIG_FEATURE_XARGS_SUPPORT_QUOTES=y +CONFIG_FEATURE_XARGS_SUPPORT_TERMOPT=y +CONFIG_FEATURE_XARGS_SUPPORT_ZERO_TERM=y + +# +# Init Utilities +# +CONFIG_INIT=y +CONFIG_FEATURE_USE_INITTAB=y +# CONFIG_FEATURE_INITRD is not set +# CONFIG_FEATURE_INIT_COREDUMPS is not set +# CONFIG_FEATURE_EXTRA_QUIET is not set +# CONFIG_HALT is not set +# CONFIG_POWEROFF is not set +CONFIG_REBOOT=y +CONFIG_MESG=y + +# +# Login/Password Management Utilities +# +# CONFIG_USE_BB_PWD_GRP is not set +# CONFIG_ADDGROUP is not set +# CONFIG_DELGROUP is not set +# CONFIG_ADDUSER is not set +# CONFIG_DELUSER is not set +# CONFIG_GETTY is not set +# CONFIG_LOGIN is not set +CONFIG_PASSWD=y +# CONFIG_SU is not set +# CONFIG_SULOGIN is not set +# CONFIG_VLOCK is not set + +# +# Miscellaneous Utilities +# +# CONFIG_ADJTIMEX is not set +CONFIG_CROND=y +# CONFIG_FEATURE_CROND_CALL_SENDMAIL is not set +CONFIG_CRONTAB=y +# CONFIG_DC is not set +# CONFIG_DEVFSD is not set +# CONFIG_LAST is not set +# CONFIG_HDPARM is not set +# CONFIG_MAKEDEVS is not set +# CONFIG_MT is not set +CONFIG_RESETMON=y +# CONFIG_RX is not set +CONFIG_STRINGS=y +CONFIG_TIME=y +# CONFIG_WATCHDOG is not set + +# +# Linux Module Utilities +# +CONFIG_INSMOD=y +CONFIG_FEATURE_2_4_MODULES=y +# CONFIG_FEATURE_2_6_MODULES is not set +# CONFIG_FEATURE_INSMOD_VERSION_CHECKING is not set +# CONFIG_FEATURE_INSMOD_KSYMOOPS_SYMBOLS is not set +# CONFIG_FEATURE_INSMOD_LOADINKMEM is not set +# CONFIG_FEATURE_INSMOD_LOAD_MAP is not set +CONFIG_LSMOD=y +CONFIG_FEATURE_QUERY_MODULE_INTERFACE=y +# CONFIG_MODPROBE is not set +CONFIG_RMMOD=y +# CONFIG_FEATURE_CHECK_TAINTED_MODULE is not set + +# +# Networking Utilities +# +CONFIG_FEATURE_IPV6=y +CONFIG_ARPING=y +# CONFIG_FTPGET is not set +# CONFIG_FTPPUT is not set +# CONFIG_HOSTNAME is not set +CONFIG_HTTPD=y +# CONFIG_FEATURE_HTTPD_USAGE_FROM_INETD_ONLY is not set +CONFIG_FEATURE_HTTPD_BASIC_AUTH=y +CONFIG_FEATURE_HTTPD_AUTH_MD5=y +CONFIG_FEATURE_HTTPD_RELOAD_CONFIG_SIGHUP=y +# CONFIG_FEATURE_HTTPD_SETUID is not set +CONFIG_FEATURE_HTTPD_CONFIG_WITH_MIME_TYPES=y +CONFIG_FEATURE_HTTPD_CGI=y +CONFIG_FEATURE_HTTPD_SET_REMOTE_PORT_TO_ENV=y +CONFIG_FEATURE_HTTPD_ENCODE_URL_STR=y +CONFIG_IFCONFIG=y +CONFIG_FEATURE_IFCONFIG_STATUS=y +# CONFIG_FEATURE_IFCONFIG_SLIP is not set +# CONFIG_FEATURE_IFCONFIG_MEMSTART_IOADDR_IRQ is not set +CONFIG_FEATURE_IFCONFIG_HW=y +CONFIG_FEATURE_IFCONFIG_BROADCAST_PLUS=y +# CONFIG_IFUPDOWN is not set +# CONFIG_INETD is not set +# CONFIG_IP is not set +CONFIG_IPCALC=y +CONFIG_FEATURE_IPCALC_FANCY=y +# CONFIG_IPADDR is not set +# CONFIG_IPLINK is not set +# CONFIG_IPROUTE is not set +# CONFIG_IPTUNNEL is not set +# CONFIG_NAMEIF is not set +CONFIG_NC=y +CONFIG_NETSTAT=y +CONFIG_NSLOOKUP=y +CONFIG_PING=y +CONFIG_FEATURE_FANCY_PING=y +CONFIG_PING6=y +CONFIG_FEATURE_FANCY_PING6=y +CONFIG_ROUTE=y +# CONFIG_TELNET is not set +CONFIG_TELNETD=y +# CONFIG_FEATURE_TELNETD_INETD is not set +# CONFIG_TFTP is not set +CONFIG_TRACEROUTE=y +CONFIG_FEATURE_TRACEROUTE_VERBOSE=y +CONFIG_VCONFIG=y +CONFIG_WGET=y +CONFIG_FEATURE_WGET_STATUSBAR=y +CONFIG_FEATURE_WGET_AUTHENTICATION=y +CONFIG_FEATURE_WGET_IP6_LITERAL=y + +# +# udhcp Server/Client +# +# CONFIG_UDHCPD is not set +CONFIG_UDHCPC=y +# CONFIG_FEATURE_UDHCP_SYSLOG is not set +# CONFIG_FEATURE_UDHCP_DEBUG is not set + +# +# Process Utilities +# +CONFIG_FREE=y +CONFIG_KILL=y +CONFIG_KILLALL=y +CONFIG_KILLALL5=y +CONFIG_PIDOF=y +CONFIG_PS=y +# CONFIG_RENICE is not set +CONFIG_TOP=y +FEATURE_CPU_USAGE_PERCENTAGE=y +CONFIG_UPTIME=y +CONFIG_SYSCTL=y + +# +# Another Bourne-like Shell +# +CONFIG_FEATURE_SH_IS_ASH=y +# CONFIG_FEATURE_SH_IS_HUSH is not set +# CONFIG_FEATURE_SH_IS_LASH is not set +# CONFIG_FEATURE_SH_IS_MSH is not set +# CONFIG_FEATURE_SH_IS_NONE is not set +CONFIG_ASH=y + +# +# Ash Shell Options +# +CONFIG_ASH_JOB_CONTROL=y +CONFIG_ASH_ALIAS=y +CONFIG_ASH_MATH_SUPPORT=y +# CONFIG_ASH_MATH_SUPPORT_64 is not set +CONFIG_ASH_GETOPTS=y +CONFIG_ASH_CMDCMD=y +# CONFIG_ASH_MAIL is not set +CONFIG_ASH_OPTIMIZE_FOR_SIZE=y +# CONFIG_ASH_RANDOM_SUPPORT is not set +# CONFIG_HUSH is not set +# CONFIG_LASH is not set +# CONFIG_MSH is not set + +# +# Bourne Shell Options +# +# CONFIG_FEATURE_SH_EXTRA_QUIET is not set +# CONFIG_FEATURE_SH_STANDALONE_SHELL is not set +CONFIG_FEATURE_COMMAND_EDITING=y +CONFIG_FEATURE_COMMAND_HISTORY=15 +# CONFIG_FEATURE_COMMAND_SAVEHISTORY is not set +CONFIG_FEATURE_COMMAND_TAB_COMPLETION=y +# CONFIG_FEATURE_COMMAND_USERNAME_COMPLETION is not set +CONFIG_FEATURE_SH_FANCY_PROMPT=y + +# +# System Logging Utilities +# +CONFIG_SYSLOGD=y +CONFIG_FEATURE_ROTATE_LOGFILE=y +CONFIG_FEATURE_REMOTE_LOG=y +CONFIG_FEATURE_IPC_SYSLOG=y +CONFIG_FEATURE_IPC_SYSLOG_BUFFER_SIZE=16 +CONFIG_LOGREAD=y +# CONFIG_FEATURE_LOGREAD_REDUCED_LOCKING is not set +CONFIG_KLOGD=y +CONFIG_LOGGER=y + +# +# Linux System Utilities +# +CONFIG_DMESG=y +# CONFIG_FBSET is not set +# CONFIG_FDFLUSH is not set +# CONFIG_FDFORMAT is not set +# CONFIG_FDISK is not set +FDISK_SUPPORT_LARGE_DISKS=y +# CONFIG_FREERAMDISK is not set +# CONFIG_FSCK_MINIX is not set +# CONFIG_MKFS_MINIX is not set +# CONFIG_GETOPT is not set +CONFIG_HEXDUMP=y +# CONFIG_HWCLOCK is not set +# CONFIG_LOSETUP is not set +# CONFIG_MKSWAP is not set +CONFIG_MORE=y +CONFIG_FEATURE_USE_TERMIOS=y +CONFIG_PIVOT_ROOT=y +CONFIG_RDATE=y +# CONFIG_SWAPONOFF is not set +CONFIG_MOUNT=y +CONFIG_NFSMOUNT=y +CONFIG_UMOUNT=y +CONFIG_FEATURE_MOUNT_FORCE=y + +# +# Common options for mount/umount +# +CONFIG_FEATURE_MOUNT_LOOP=y +# CONFIG_FEATURE_MTAB_SUPPORT is not set + +# +# Debugging Options +# +# CONFIG_DEBUG is not set diff --git a/obsolete-buildroot/sources/openwrt/busybox/patches/100-killall5.patch b/obsolete-buildroot/sources/openwrt/busybox/patches/100-killall5.patch new file mode 100644 index 000000000..161b7e6f2 --- /dev/null +++ b/obsolete-buildroot/sources/openwrt/busybox/patches/100-killall5.patch @@ -0,0 +1,87 @@ +diff -urN busybox-dist/include/applets.h busybox/include/applets.h +--- busybox-dist/include/applets.h 2004-03-13 02:33:09.000000000 -0600 ++++ busybox/include/applets.h 2004-03-16 09:45:29.000000000 -0600 +@@ -313,6 +313,9 @@ + #ifdef CONFIG_KILLALL + APPLET(killall, kill_main, _BB_DIR_USR_BIN, _BB_SUID_NEVER) + #endif ++#ifdef CONFIG_KILLALL5 ++ APPLET(killall5, kill_main, _BB_DIR_USR_BIN, _BB_SUID_NEVER) ++#endif + #ifdef CONFIG_KLOGD + APPLET(klogd, klogd_main, _BB_DIR_SBIN, _BB_SUID_NEVER) + #endif +diff -urN busybox-dist/include/usage.h busybox/include/usage.h +--- busybox-dist/include/usage.h 2004-03-13 02:33:09.000000000 -0600 ++++ busybox/include/usage.h 2004-03-16 09:45:29.000000000 -0600 +@@ -1389,6 +1389,13 @@ + #define killall_example_usage \ + "$ killall apache\n" + ++#define killall5_trivial_usage \ ++ "" ++#define killall5_full_usage \ ++ "" ++#define killall5_example_usage \ ++ "" ++ + #define klogd_trivial_usage \ + "[-c n] [-n]" + #define klogd_full_usage \ +diff -urN busybox-dist/procps/Config.in busybox/procps/Config.in +--- busybox-dist/procps/Config.in 2003-12-24 00:02:11.000000000 -0600 ++++ busybox/procps/Config.in 2004-03-16 09:45:29.000000000 -0600 +@@ -30,6 +30,11 @@ + specified commands. If no signal name is specified, SIGTERM is + sent. + ++config CONFIG_KILLALL5 ++ bool "killall5" ++ default n ++ depends on CONFIG_KILL ++ + config CONFIG_PIDOF + bool "pidof" + default n +diff -urN busybox-dist/procps/kill.c busybox/procps/kill.c +--- busybox-dist/procps/kill.c 2004-03-15 02:29:03.000000000 -0600 ++++ busybox/procps/kill.c 2004-03-16 09:45:29.000000000 -0600 +@@ -34,6 +34,7 @@ + + #define KILL 0 + #define KILLALL 1 ++#define KILLALL5 2 + + extern int kill_main(int argc, char **argv) + { +@@ -47,6 +48,9 @@ + #else + whichApp = KILL; + #endif ++#ifdef CONFIG_KILLALL5 ++ whichApp = (strcmp(bb_applet_name, "killall5") == 0)? KILLALL5 : whichApp; ++#endif + + /* Parse any options */ + if (argc < 2) +@@ -119,6 +123,20 @@ + } + + } ++#ifdef CONFIG_KILLALL5 ++ else if (whichApp == KILLALL5) { ++ procps_status_t * p; ++ pid_t myPid=getpid(); ++ while ((p = procps_scan(0)) != 0) { ++ if (p->pid != 1 && p->pid != myPid && p->pid != p->ppid) { ++ if (kill(p->pid, signo) != 0) { ++ bb_perror_msg( "Could not kill pid '%d'", p->pid); ++ errors++; ++ } ++ } ++ } ++ } ++#endif + #ifdef CONFIG_KILLALL + else { + pid_t myPid=getpid(); diff --git a/obsolete-buildroot/sources/openwrt/busybox/patches/110-telnetd.patch b/obsolete-buildroot/sources/openwrt/busybox/patches/110-telnetd.patch new file mode 100644 index 000000000..e95757ee4 --- /dev/null +++ b/obsolete-buildroot/sources/openwrt/busybox/patches/110-telnetd.patch @@ -0,0 +1,53 @@ +diff -urN busybox-1.00-pre8/networking/telnetd.c busybox-1.00-pre8-openwrt/networking/telnetd.c +--- busybox-1.00-pre8/networking/telnetd.c 2004-02-22 03:45:57.000000000 -0600 ++++ busybox-1.00-pre8-openwrt/networking/telnetd.c 2004-03-05 01:32:57.000000000 -0600 +@@ -44,6 +44,8 @@ + #include <arpa/telnet.h> + #include <ctype.h> + #include <sys/syslog.h> ++#include <net/if.h> ++ + + #include "busybox.h" + +@@ -384,11 +386,13 @@ + int portnbr = 23; + #endif /* CONFIG_FEATURE_TELNETD_INETD */ + int c; ++ char *interface_name = NULL; ++ struct ifreq interface; + static const char options[] = + #ifdef CONFIG_FEATURE_TELNETD_INETD +- "f:l:"; +-#else /* CONFIG_EATURE_TELNETD_INETD */ +- "f:l:p:"; ++ "i:f:l:"; ++#else /* CONFIG_FEATURE_TELNETD_INETD */ ++ "i:f:l:p:"; + #endif /* CONFIG_FEATURE_TELNETD_INETD */ + int maxlen, w, r; + +@@ -403,6 +407,9 @@ + case 'f': + issuefile = strdup (optarg); + break; ++ case 'i': ++ interface_name = strdup(optarg); ++ break; + case 'l': + loginpath = strdup (optarg); + break; +@@ -442,6 +449,13 @@ + sa.sin_family = AF_INET; + sa.sin_port = htons(portnbr); + ++ /* Set it to listen on the specified interface */ ++ if (interface_name) { ++ strncpy(interface.ifr_ifrn.ifrn_name, interface_name, IFNAMSIZ); ++ (void)setsockopt(master_fd, SOL_SOCKET, ++ SO_BINDTODEVICE, &interface, sizeof(interface)); ++ } ++ + if (bind(master_fd, (struct sockaddr *) &sa, sizeof(sa)) < 0) { + bb_perror_msg_and_die("bind"); + } diff --git a/obsolete-buildroot/sources/openwrt/busybox/patches/130-resetmon.patch b/obsolete-buildroot/sources/openwrt/busybox/patches/130-resetmon.patch new file mode 100644 index 000000000..b41315e1f --- /dev/null +++ b/obsolete-buildroot/sources/openwrt/busybox/patches/130-resetmon.patch @@ -0,0 +1,89 @@ +diff -urN busybox-dist/include/applets.h busybox/include/applets.h +--- busybox-dist/include/applets.h 2004-03-16 09:56:27.000000000 -0600 ++++ busybox/include/applets.h 2004-03-16 10:00:14.000000000 -0600 +@@ -484,6 +484,9 @@ + #ifdef CONFIG_RESET + APPLET(reset, reset_main, _BB_DIR_USR_BIN, _BB_SUID_NEVER) + #endif ++#ifdef CONFIG_RESETMON ++ APPLET(resetmon, resetmon_main, _BB_DIR_SBIN, _BB_SUID_NEVER) ++#endif + #ifdef CONFIG_RM + APPLET(rm, rm_main, _BB_DIR_BIN, _BB_SUID_NEVER) + #endif +diff -urN busybox-dist/include/usage.h busybox/include/usage.h +--- busybox-dist/include/usage.h 2004-03-16 09:56:27.000000000 -0600 ++++ busybox/include/usage.h 2004-03-16 10:00:14.000000000 -0600 +@@ -2024,6 +2024,11 @@ + #define reset_full_usage \ + "Resets the screen." + ++#define resetmon_trivial_usage \ ++ "" ++#define resetmon_full_usage \ ++ "Return an exit code of TRUE (0) if reset is NOT pressed." ++ + #define rm_trivial_usage \ + "[OPTION]... FILE..." + #define rm_full_usage \ +diff -urN busybox-dist/miscutils/Config.in busybox/miscutils/Config.in +--- busybox-dist/miscutils/Config.in 2004-03-15 02:28:46.000000000 -0600 ++++ busybox/miscutils/Config.in 2004-03-16 10:00:14.000000000 -0600 +@@ -156,6 +156,12 @@ + to advance or rewind a tape past a specified number of archive + files on the tape. + ++config CONFIG_RESETMON ++ bool "resetmon" ++ default y ++ help ++ Linksys wrt54g reset button monitor. Returns TRUE if NOT pressed. ++ + config CONFIG_RX + bool "rx" + default n +diff -urN busybox-dist/miscutils/Makefile.in busybox/miscutils/Makefile.in +--- busybox-dist/miscutils/Makefile.in 2004-03-15 02:28:46.000000000 -0600 ++++ busybox/miscutils/Makefile.in 2004-03-16 10:00:14.000000000 -0600 +@@ -33,6 +33,7 @@ + MISCUTILS-$(CONFIG_LAST) += last.o + MISCUTILS-$(CONFIG_MAKEDEVS) += makedevs.o + MISCUTILS-$(CONFIG_MT) += mt.o ++MISCUTILS-$(CONFIG_RESETMON) += resetmon.o + MISCUTILS-$(CONFIG_RX) += rx.o + MISCUTILS-$(CONFIG_STRINGS) += strings.o + MISCUTILS-$(CONFIG_TIME) += time.o +diff -urN busybox-dist/miscutils/resetmon.c busybox/miscutils/resetmon.c +--- busybox-dist/miscutils/resetmon.c 1969-12-31 18:00:00.000000000 -0600 ++++ busybox/miscutils/resetmon.c 2004-03-16 10:00:14.000000000 -0600 +@@ -0,0 +1,30 @@ ++#include <unistd.h> ++#include <fcntl.h> ++#include "busybox.h" ++ ++#define RESET (1<<6) ++ ++int resetmon_main(int argc, char **argv) { ++ int fd = -1; ++ unsigned int val=0; ++ ++#if 0 ++ if ((fd = open("/dev/gpio/control",O_RDWR))<0) goto error; ++ read(fd,&val,4); ++ val|=RESET; ++ write(fd,&val,4); ++ ++ if ((fd = open("/dev/gpio/outen",O_RDWR))<0) goto error; ++ read(fd,&val,4); ++ val&=~RESET; ++ write(fd,&val,4); ++#endif ++ ++ if ((fd = open("/dev/gpio/in",O_RDONLY))<0) goto error; ++ read(fd,&val,4); ++ ++ return !(val&RESET); ++ ++error: ++ return 1; ++} |