-rw-r--r-- | libopie2/opiecore/device/odevice_jornada.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libopie2/opiecore/device/odevice_jornada.cpp b/libopie2/opiecore/device/odevice_jornada.cpp index 5d32901..60736a1 100644 --- a/libopie2/opiecore/device/odevice_jornada.cpp +++ b/libopie2/opiecore/device/odevice_jornada.cpp | |||
@@ -178,31 +178,31 @@ bool Jornada::suspend( ) | |||
178 | { | 178 | { |
179 | qDebug("ODevice::suspend"); | 179 | qDebug("ODevice::suspend"); |
180 | if ( !isQWS( ) ) // only qwsserver is allowed to suspend | 180 | if ( !isQWS( ) ) // only qwsserver is allowed to suspend |
181 | return false; | 181 | return false; |
182 | 182 | ||
183 | if ( d->m_model == Model_Unknown ) // better don't suspend in qvfb / on unkown devices | 183 | if ( d->m_model == Model_Unknown ) // better don't suspend in qvfb / on unkown devices |
184 | return false; | 184 | return false; |
185 | 185 | ||
186 | bool res = false; | 186 | bool res = false; |
187 | ODevice::sendSuspendmsg(); | 187 | ODevice::sendSuspendmsg(); |
188 | 188 | ||
189 | struct timeval tvs; | 189 | struct timeval tvs; |
190 | ::gettimeofday ( &tvs, 0 ); | 190 | ::gettimeofday ( &tvs, 0 ); |
191 | 191 | ||
192 | ::sync(); // flush fs caches | 192 | ::sync(); // flush fs caches |
193 | res = ( ::system ( "apm --suspend" ) == 0 ); | 193 | res = ( ::system ( "apm --suspend" ) == 0 ); |
194 | 194 | ||
195 | return res; | 195 | return res; |
196 | } | 196 | } |
197 | 197 | ||
198 | bool Jornada::setDisplayStatus ( bool on ) | 198 | bool Jornada::setDisplayStatus ( bool on ) |
199 | { | 199 | { |
200 | bool res = false; | 200 | bool res = false; |
201 | 201 | ||
202 | QString cmdline = QString().sprintf( "echo %d > /sys/class/lcd/sa1100fb/power; echo %d > /sys/class/backlight/sa1100fb/power", on ? "0" : "4", on? "0" : "4" ); | 202 | QString cmdline = QString( "echo %1 > /sys/class/lcd/sa1100fb/power; echo %2 > /sys/class/backlight/sa1100fb/power").arg( on ? "0" : "4" ).arg( on ? "0" : "4" ); |
203 | 203 | ||
204 | res = ( ::system( (const char*) cmdline ) == 0 ); | 204 | res = ( ::system( (const char*) cmdline ) == 0 ); |
205 | 205 | ||
206 | return res; | 206 | return res; |
207 | } | 207 | } |
208 | 208 | ||