diff options
author | mbm <mbm@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2004-08-26 19:14:54 +0000 |
---|---|---|
committer | mbm <mbm@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2004-08-26 19:14:54 +0000 |
commit | f4da8cab588284adf82b8b8c4258493a1cc77e10 (patch) | |
tree | 096ced9f89cb8aa3c4d26b422b849aaa4cc5cad6 /obsolete-buildroot/sources/openwrt/busybox | |
parent | 6f13c412d16997df8b8e51d53abd0fa604f8201e (diff) |
replace resetmon with /proc/sys/reset
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@147 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'obsolete-buildroot/sources/openwrt/busybox')
-rw-r--r-- | obsolete-buildroot/sources/openwrt/busybox/patches/130-resetmon.patch | 89 |
1 files changed, 0 insertions, 89 deletions
diff --git a/obsolete-buildroot/sources/openwrt/busybox/patches/130-resetmon.patch b/obsolete-buildroot/sources/openwrt/busybox/patches/130-resetmon.patch deleted file mode 100644 index b41315e1f..000000000 --- a/obsolete-buildroot/sources/openwrt/busybox/patches/130-resetmon.patch +++ /dev/null @@ -1,89 +0,0 @@ -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; -+} |