summaryrefslogtreecommitdiff
authorzecke <zecke>2004-05-01 21:18:03 (UTC)
committer zecke <zecke>2004-05-01 21:18:03 (UTC)
commit8aa8b5166653d52f9623fbb1391d044916a2a260 (patch) (unidiff)
treeebd284f0bb38d948ad6e4b4ab3eef62fbff7bcae
parent49227638e76fa71209390a9c42528a02e3803e3d (diff)
downloadopie-8aa8b5166653d52f9623fbb1391d044916a2a260.zip
opie-8aa8b5166653d52f9623fbb1391d044916a2a260.tar.gz
opie-8aa8b5166653d52f9623fbb1391d044916a2a260.tar.bz2
Do not include symbols we don't need normally
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-console/fixit.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/noncore/apps/opie-console/fixit.h b/noncore/apps/opie-console/fixit.h
index 501914e..6a8a101 100644
--- a/noncore/apps/opie-console/fixit.h
+++ b/noncore/apps/opie-console/fixit.h
@@ -1,88 +1,90 @@
1#ifndef FIX_IT_H 1#ifndef FIX_IT_H
2#define FIX_IT_H 2#define FIX_IT_H
3 3
4 4
5#include <sys/types.h> 5#include <sys/types.h>
6 6
7#include <stdio.h> 7#include <stdio.h>
8#include <stdlib.h> 8#include <stdlib.h>
9#include <signal.h> 9#include <signal.h>
10#include <qfile.h> 10#include <qfile.h>
11 11
12/* 12/*
13 * The Zaurus rom 13 * The Zaurus rom
14 */ 14 */
15class FixIt { 15class FixIt {
16public: 16public:
17 FixIt(); 17 FixIt();
18 ~FixIt(); 18 ~FixIt();
19 void fixIt(); 19 void fixIt();
20 /* no real interested in implementing it */ 20 /* no real interested in implementing it */
21 void breakIt() { 21 void breakIt() {
22 22
23 }; 23 };
24 char* m_file; 24 char* m_file;
25}; 25};
26 26
27#ifdef FSCKED_DISTRI
27FixIt::FixIt() { 28FixIt::FixIt() {
28 /* the new inittab */ 29 /* the new inittab */
29 m_file = "#\n# /etc/inittab" 30 m_file = "#\n# /etc/inittab"
30"#" 31"#"
31"" 32""
32"# 0 - halt (Do NOT set initdefault to this)" 33"# 0 - halt (Do NOT set initdefault to this)"
33"# 1 - Single user mode" 34"# 1 - Single user mode"
34"# 2 - Multiuser, without NFS (The same as 3, if you do not have networking)" 35"# 2 - Multiuser, without NFS (The same as 3, if you do not have networking)"
35"# 3 - Full multiuser mode" 36"# 3 - Full multiuser mode"
36"# 4 - JavaVM(Intent) developer mode" 37"# 4 - JavaVM(Intent) developer mode"
37"# 5 - JavaVM(Intent)" 38"# 5 - JavaVM(Intent)"
38"# 6 - reboot (Do NOT set initdefault to this)" 39"# 6 - reboot (Do NOT set initdefault to this)"
39"#" 40"#"
40"id:5:initdefault:" 41"id:5:initdefault:"
41"" 42""
42"# Specify things to do when starting" 43"# Specify things to do when starting"
43"si::sysinit:/etc/rc.d/rc.sysinit" 44"si::sysinit:/etc/rc.d/rc.sysinit"
44"" 45""
45"l0:0:wait:/root/etc/rc.d/rc 0" 46"l0:0:wait:/root/etc/rc.d/rc 0"
46"l1:1:wait:/etc/rc.d/rc 1" 47"l1:1:wait:/etc/rc.d/rc 1"
47"l2:2:wait:/etc/rc.d/rc 2" 48"l2:2:wait:/etc/rc.d/rc 2"
48"l3:3:wait:/etc/rc.d/rc 3" 49"l3:3:wait:/etc/rc.d/rc 3"
49"l4:4:wait:/etc/rc.d/rc 4" 50"l4:4:wait:/etc/rc.d/rc 4"
50"l5:5:wait:/etc/rc.d/rc 5" 51"l5:5:wait:/etc/rc.d/rc 5"
51"l6:6:wait:/root/etc/rc.d/rc 6" 52"l6:6:wait:/root/etc/rc.d/rc 6"
52"" 53""
53"# Specify things to do before rebooting" 54"# Specify things to do before rebooting"
54"um::ctrlaltdel:/bin/umount -a -r > /dev/null 2>&1" 55"um::ctrlaltdel:/bin/umount -a -r > /dev/null 2>&1"
55"sw::ctrlaltdel:/sbin/swapoff -a > /dev/null 2>&1" 56"sw::ctrlaltdel:/sbin/swapoff -a > /dev/null 2>&1"
56"" 57""
57"# Specify program to run on ttyS0" 58"# Specify program to run on ttyS0"
58"s0:24:respawn:/sbin/getty 9600 ttyS0" 59"s0:24:respawn:/sbin/getty 9600 ttyS0"
59"#pd:5:respawn:/etc/sync/serialctl" 60"#pd:5:respawn:/etc/sync/serialctl"
60"" 61""
61"# Specify program to run on tty1" 62"# Specify program to run on tty1"
62"1:2:respawn:/sbin/getty 9600 tty1" 63"1:2:respawn:/sbin/getty 9600 tty1"
63"ln:345:respawn:survive -l 6 /sbin/launch" 64"ln:345:respawn:survive -l 6 /sbin/launch"
64"#qt:5:respawn:/sbin/qt" 65"#qt:5:respawn:/sbin/qt"
65"" 66""
66"# collie sp." 67"# collie sp."
67"sy::respawn:/sbin/shsync\n"; 68"sy::respawn:/sbin/shsync\n";
68 69
69} 70}
70FixIt::~FixIt() { 71FixIt::~FixIt() {
71} 72}
72/* 73/*
73 * the retail Zaurus is broken in many ways 74 * the retail Zaurus is broken in many ways
74 * one is that pppd is listening on our port... 75 * one is that pppd is listening on our port...
75 * we've to stop it from that and then do kill(SIGHUP,1); 76 * we've to stop it from that and then do kill(SIGHUP,1);
76 */ 77 */
77void FixIt::fixIt() { 78void FixIt::fixIt() {
78 ::rename("/etc/inittab", QPEApplication::qpeDir() + "/etc/inittab" ); 79 ::rename("/etc/inittab", QPEApplication::qpeDir() + "/etc/inittab" );
79 QFile file( "/etc/inittab" ); 80 QFile file( "/etc/inittab" );
80 if ( file.open(IO_WriteOnly | IO_Raw ) ) { 81 if ( file.open(IO_WriteOnly | IO_Raw ) ) {
81 file.writeBlock(m_file,strlen(m_file) ); 82 file.writeBlock(m_file,strlen(m_file) );
82 } 83 }
83 file.close(); 84 file.close();
84 ::kill( SIGHUP, 1 ); 85 ::kill( SIGHUP, 1 );
85} 86}
86 87
88#endif
87 89
88#endif 90#endif