diff options
Diffstat (limited to 'obsolete-buildroot/sources/openwrt/busybox/patches')
3 files changed, 229 insertions, 0 deletions
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 0000000000..161b7e6f25 --- /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 0000000000..e95757ee4e --- /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 0000000000..b41315e1f7 --- /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; ++} |