summaryrefslogtreecommitdiff
authorharlekin <harlekin>2004-04-22 19:00:32 (UTC)
committer harlekin <harlekin>2004-04-22 19:00:32 (UTC)
commite9d1a3bf70b2f79f47a4d5ad826712aa5d654d8e (patch) (unidiff)
tree0d9d19ece0eaa5e6d637c24eebfe4f1f3c2f57fb
parent5c6499c56cd5c00603634546e6ba8c4d9da9741d (diff)
downloadopie-e9d1a3bf70b2f79f47a4d5ad826712aa5d654d8e.zip
opie-e9d1a3bf70b2f79f47a4d5ad826712aa5d654d8e.tar.gz
opie-e9d1a3bf70b2f79f47a4d5ad826712aa5d654d8e.tar.bz2
do not activate support for the broken sharp rom by default
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-console/main.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/noncore/apps/opie-console/main.cpp b/noncore/apps/opie-console/main.cpp
index f61f44e..92921ab 100644
--- a/noncore/apps/opie-console/main.cpp
+++ b/noncore/apps/opie-console/main.cpp
@@ -1,110 +1,110 @@
1#include <sys/types.h> 1#include <sys/types.h>
2 2
3#include <stdio.h> 3#include <stdio.h>
4#include <stdlib.h> 4#include <stdlib.h>
5#include <signal.h> 5#include <signal.h>
6#include <qfile.h> 6#include <qfile.h>
7 7
8#include <qpe/qpeapplication.h> 8#include <qpe/qpeapplication.h>
9 9
10#include "mainwindow.h" 10#include "mainwindow.h"
11 11
12#define FSCKED_DISTRIBUTION 1 12// #define FSCKED_DISTRIBUTION 1
13#ifdef FSCKED_DISTRIBUTION 13#ifdef FSCKED_DISTRIBUTION
14/* 14/*
15 * The Zaurus rom 15 * The Zaurus rom
16 */ 16 */
17class FixIt { 17class FixIt {
18public: 18public:
19 FixIt(); 19 FixIt();
20 ~FixIt(); 20 ~FixIt();
21 void fixIt(); 21 void fixIt();
22 /* no real interested in implementing it */ 22 /* no real interested in implementing it */
23 void breakIt() { 23 void breakIt() {
24 24
25 }; 25 };
26 char* m_file; 26 char* m_file;
27}; 27};
28 28
29FixIt::FixIt() { 29FixIt::FixIt() {
30 /* the new inittab */ 30 /* the new inittab */
31 m_file = "#\n# /etc/inittab" 31 m_file = "#\n# /etc/inittab"
32"#" 32"#"
33"" 33""
34"# 0 - halt (Do NOT set initdefault to this)" 34"# 0 - halt (Do NOT set initdefault to this)"
35"# 1 - Single user mode" 35"# 1 - Single user mode"
36"# 2 - Multiuser, without NFS (The same as 3, if you do not have networking)" 36"# 2 - Multiuser, without NFS (The same as 3, if you do not have networking)"
37"# 3 - Full multiuser mode" 37"# 3 - Full multiuser mode"
38"# 4 - JavaVM(Intent) developer mode" 38"# 4 - JavaVM(Intent) developer mode"
39"# 5 - JavaVM(Intent)" 39"# 5 - JavaVM(Intent)"
40"# 6 - reboot (Do NOT set initdefault to this)" 40"# 6 - reboot (Do NOT set initdefault to this)"
41"#" 41"#"
42"id:5:initdefault:" 42"id:5:initdefault:"
43"" 43""
44"# Specify things to do when starting" 44"# Specify things to do when starting"
45"si::sysinit:/etc/rc.d/rc.sysinit" 45"si::sysinit:/etc/rc.d/rc.sysinit"
46"" 46""
47"l0:0:wait:/root/etc/rc.d/rc 0" 47"l0:0:wait:/root/etc/rc.d/rc 0"
48"l1:1:wait:/etc/rc.d/rc 1" 48"l1:1:wait:/etc/rc.d/rc 1"
49"l2:2:wait:/etc/rc.d/rc 2" 49"l2:2:wait:/etc/rc.d/rc 2"
50"l3:3:wait:/etc/rc.d/rc 3" 50"l3:3:wait:/etc/rc.d/rc 3"
51"l4:4:wait:/etc/rc.d/rc 4" 51"l4:4:wait:/etc/rc.d/rc 4"
52"l5:5:wait:/etc/rc.d/rc 5" 52"l5:5:wait:/etc/rc.d/rc 5"
53"l6:6:wait:/root/etc/rc.d/rc 6" 53"l6:6:wait:/root/etc/rc.d/rc 6"
54"" 54""
55"# Specify things to do before rebooting" 55"# Specify things to do before rebooting"
56"um::ctrlaltdel:/bin/umount -a -r > /dev/null 2>&1" 56"um::ctrlaltdel:/bin/umount -a -r > /dev/null 2>&1"
57"sw::ctrlaltdel:/sbin/swapoff -a > /dev/null 2>&1" 57"sw::ctrlaltdel:/sbin/swapoff -a > /dev/null 2>&1"
58"" 58""
59"# Specify program to run on ttyS0" 59"# Specify program to run on ttyS0"
60"s0:24:respawn:/sbin/getty 9600 ttyS0" 60"s0:24:respawn:/sbin/getty 9600 ttyS0"
61"#pd:5:respawn:/etc/sync/serialctl" 61"#pd:5:respawn:/etc/sync/serialctl"
62"" 62""
63"# Specify program to run on tty1" 63"# Specify program to run on tty1"
64"1:2:respawn:/sbin/getty 9600 tty1" 64"1:2:respawn:/sbin/getty 9600 tty1"
65"ln:345:respawn:survive -l 6 /sbin/launch" 65"ln:345:respawn:survive -l 6 /sbin/launch"
66"#qt:5:respawn:/sbin/qt" 66"#qt:5:respawn:/sbin/qt"
67"" 67""
68"# collie sp." 68"# collie sp."
69"sy::respawn:/sbin/shsync\n"; 69"sy::respawn:/sbin/shsync\n";
70} 70}
71FixIt::~FixIt() { 71FixIt::~FixIt() {
72} 72}
73/* 73/*
74 * the retail Zaurus is broken in many ways 74 * the retail Zaurus is broken in many ways
75 * one is that pppd is listening on our port... 75 * one is that pppd is listening on our port...
76 * 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);
77 */ 77 */
78void FixIt::fixIt() { 78void FixIt::fixIt() {
79 ::rename("/etc/inittab", QPEApplication::qpeDir() + "/etc/inittab" ); 79 ::rename("/etc/inittab", QPEApplication::qpeDir() + "/etc/inittab" );
80 QFile file( "/etc/inittab" ); 80 QFile file( "/etc/inittab" );
81 if ( file.open(IO_WriteOnly | IO_Raw ) ) { 81 if ( file.open(IO_WriteOnly | IO_Raw ) ) {
82 file.writeBlock(m_file,strlen(m_file) ); 82 file.writeBlock(m_file,strlen(m_file) );
83 } 83 }
84 file.close(); 84 file.close();
85 ::kill( SIGHUP, 1 ); 85 ::kill( SIGHUP, 1 );
86} 86}
87#endif 87#endif
88 88
89int main(int argc, char **argv) { 89int main(int argc, char **argv) {
90// too bad this gives us trouble the taskbar... argv[0]="embeddedkonsole"; 90// too bad this gives us trouble the taskbar... argv[0]="embeddedkonsole";
91 QPEApplication app( argc, argv ); 91 QPEApplication app( argc, argv );
92 92
93#ifdef FSCKED_DISTRIBUTION 93#ifdef FSCKED_DISTRIBUTION
94// owarn << "fscked" << oendl; 94// owarn << "fscked" << oendl;
95 FixIt it; 95 FixIt it;
96 it.fixIt(); 96 it.fixIt();
97#endif 97#endif
98 98
99 MainWindow mw; 99 MainWindow mw;
100 mw.setCaption(QObject::tr("Opie Console") ); 100 mw.setCaption(QObject::tr("Opie Console") );
101 app.showMainWidget( &mw ); 101 app.showMainWidget( &mw );
102 102
103 int ap = app.exec(); 103 int ap = app.exec();
104 104
105#ifdef FSCKED_DISTRIBUTION 105#ifdef FSCKED_DISTRIBUTION
106 /* should add a signal handler too */ 106 /* should add a signal handler too */
107 it.breakIt(); 107 it.breakIt();
108#endif 108#endif
109 return ap; 109 return ap;
110} 110}