author | mickeyl <mickeyl> | 2005-01-11 21:08:00 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2005-01-11 21:08:00 (UTC) |
commit | f89120a7a1a3d0bf9c0805456490906ca914e560 (patch) (side-by-side diff) | |
tree | 23c184e6c2111b7870ef9eccffc11ae8bf225de2 | |
parent | f8fd8556da5649f54af740a5dbb9a8c1ead2bcfc (diff) | |
download | opie-f89120a7a1a3d0bf9c0805456490906ca914e560.zip opie-f89120a7a1a3d0bf9c0805456490906ca914e560.tar.gz opie-f89120a7a1a3d0bf9c0805456490906ca914e560.tar.bz2 |
workaround a quirk in the linux kernel semantics
echo 1 >power actually powers off a device *cough*
-rw-r--r-- | libopie2/opiecore/device/odevice_zaurus.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libopie2/opiecore/device/odevice_zaurus.cpp b/libopie2/opiecore/device/odevice_zaurus.cpp index 269f6c9..d3ab63a 100644 --- a/libopie2/opiecore/device/odevice_zaurus.cpp +++ b/libopie2/opiecore/device/odevice_zaurus.cpp @@ -475,49 +475,49 @@ bool Zaurus::setDisplayBrightness( int bright ) } } return res; } bool Zaurus::setDisplayStatus( bool on ) { bool res = false; if ( m_embedix ) { int fd = ::open( SHARP_FL_IOCTL_DEVICE, O_WRONLY|O_NONBLOCK ); if ( fd ) { int ioctlnum = on ? SHARP_FL_IOCTL_ON : SHARP_FL_IOCTL_OFF; res = ( ::ioctl ( fd, ioctlnum, 0 ) == 0 ); ::close ( fd ); } } else { int fd = ::open( "/sys/class/backlight/corgi-bl/power", O_WRONLY|O_NONBLOCK ); if ( fd ) { char buf[10]; - buf[0] = on ? '0' : '1'; + buf[0] = on ? '1' : '0'; buf[1] = '\0'; res = ( ::write( fd, &buf[0], 2 ) == 0 ); ::close( fd ); } } return res; } bool Zaurus::suspend() { qDebug("ODevice::suspend"); if ( !isQWS( ) ) // only qwsserver is allowed to suspend return false; if ( d->m_model == Model_Unknown ) // better don't suspend in qvfb / on unkown devices return false; bool res = false; ODevice::sendSuspendmsg(); struct timeval tvs, tvn; ::gettimeofday ( &tvs, 0 ); ::sync(); // flush fs caches |