summaryrefslogtreecommitdiff
path: root/recipes/void11/files/oezc.patch
blob: 998f14c44e8a73d9b40b69d662bd18d7d39952e8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
diff -urN void11-0.2.0/console/Makefile void11-0.2.0-zc/console/Makefile
--- void11-0.2.0/console/Makefile	2004-01-08 05:05:56.000000000 -0500
+++ void11-0.2.0-zc/console/Makefile	2007-03-04 12:47:44.000000000 -0500
@@ -11,7 +11,6 @@
 
 $(PROG): $(PROGOBJ)
 	$(CC) $(CFLAGS) $(PROGOBJ) $(LIB) -o $@
-	$(STRIP) $@
 
 clean:
 	$(RM) $(PROGOBJ) $(PROG) *~
diff -urN void11-0.2.0/console/void11_hopper void11-0.2.0-zc/console/void11_hopper
--- void11-0.2.0/console/void11_hopper	2003-03-14 22:25:02.000000000 -0500
+++ void11-0.2.0-zc/console/void11_hopper	2007-03-04 12:50:20.000000000 -0500
@@ -1,3 +1,8 @@
 #!/bin/sh
+iwconfig wlan0 essid test
+smallsleep 0.5
+iwpriv wlan0 hostapd 1
+smallsleep 0.5
 iwconfig wlan0 mode master
-while(true); do for i in $(seq 1 14); do iwconfig wlan0 channel $i; sleep 0.2; echo -n "$i. "; done; done 2>/dev/null
+#while(true); do for i in $(seq 1 14); do iwconfig wlan0 channel $i; sleep 0.2; echo -n "$i. "; done; done 2>/dev/null
+while(true); do for i in $(seq 1 11); do iwconfig wlan0 channel $i; smallsleep 0.2; echo -n "$i. "; done; done
diff -urN void11-0.2.0/lib/Makefile void11-0.2.0-zc/lib/Makefile
--- void11-0.2.0/lib/Makefile	2004-01-08 05:04:37.000000000 -0500
+++ void11-0.2.0-zc/lib/Makefile	2007-03-04 13:19:18.000000000 -0500
@@ -11,7 +11,7 @@
 
 $(LIB): $(LIBOBJ) $(HEADER)
 	rm -f $@ || true
-	gcc -shared -o $@ $(LIBOBJ)
+	${CC} -shared -o $@ $(LIBOBJ)
 
 clean:
 	$(RM) $(PROGOBJ) $(LIBOBJ) $(LIB) *~
diff -urN void11-0.2.0/Makefile void11-0.2.0-zc/Makefile
--- void11-0.2.0/Makefile	2004-01-08 06:49:00.000000000 -0500
+++ void11-0.2.0-zc/Makefile	2007-03-04 13:13:58.000000000 -0500
@@ -2,7 +2,7 @@
 
 include $(VOID11_TOPDIR)/Rules.make
 
-SUBDIRS		= lib
+SUBDIRS		= lib smallsleep
 CONFIG		=
 
 ifdef USECONSOLE
@@ -19,6 +19,9 @@
 lib:
 	@$(MAKE) -C $(VOID11_TOPDIR)/$@ -f Makefile VOID11_TOPDIR=$(VOID11_TOPDIR)
 
+smallsleep:
+	@$(MAKE) -C $(VOID11_TOPDIR)/$@ -f Makefile VOID11_TOPDIR=$(VOID11_TOPDIR)
+
 console: lib
 	@$(MAKE) -C $(VOID11_TOPDIR)/$@ -f Makefile VOID11_TOPDIR=$(VOID11_TOPDIR)
 
diff -urN void11-0.2.0/Rules.make void11-0.2.0-zc/Rules.make
--- void11-0.2.0/Rules.make	2004-01-08 05:03:40.000000000 -0500
+++ void11-0.2.0-zc/Rules.make	2007-03-04 13:18:14.000000000 -0500
@@ -11,5 +11,4 @@
 
 MKDIR		= mkdir -p
 CP		= cp -f
-STRIP		= strip -x
-CC		= gcc
+# CC		= gcc
diff -urN void11-0.2.0/smallsleep/Makefile void11-0.2.0-zc/smallsleep/Makefile
--- void11-0.2.0/smallsleep/Makefile	1969-12-31 19:00:00.000000000 -0500
+++ void11-0.2.0-zc/smallsleep/Makefile	2007-03-04 12:57:27.000000000 -0500
@@ -0,0 +1,10 @@
+CFLAGS = -g -O3 -Wall
+
+all: smallsleep
+
+smallsleep: smallsleep.c
+	$(CC) $(CFLAGS) smallsleep.c -o smallsleep
+
+install:
+	install -d /sbin
+	install -m 755 smallsleep /sbin
diff -urN void11-0.2.0/smallsleep/smallsleep.c void11-0.2.0-zc/smallsleep/smallsleep.c
--- void11-0.2.0/smallsleep/smallsleep.c	1969-12-31 19:00:00.000000000 -0500
+++ void11-0.2.0-zc/smallsleep/smallsleep.c	2007-03-04 12:57:27.000000000 -0500
@@ -0,0 +1,26 @@
+#include <unistd.h>  // for usleep
+#include <stdio.h>   // for printf()
+#include <stdlib.h>  // for atof()
+
+/* compile with
+gcc -g -Wall -o smallsleep smallsleep.c
+*/
+
+#define MICROSECONDS_IN_SECONDS 1000000
+
+int main (int argc, const char *argv[])
+{
+    if (argc != 2) {
+        fprintf (stderr, "usage: %s time-in-seconds\n", argv[0]);
+        fprintf (stderr, "   (decimal values are OK for the time)\n");
+        return (1);
+    }
+
+    float fraction;
+    fraction = atof (argv[1]);
+
+    usleep (fraction * MICROSECONDS_IN_SECONDS);
+
+    return (0);
+
+} // main