Diffstat (limited to 'libopie2/opiecore/device/odevice_zaurus.cpp') (more/less context) (ignore whitespace changes)
-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 2128d46..59f1592 100644 --- a/libopie2/opiecore/device/odevice_zaurus.cpp +++ b/libopie2/opiecore/device/odevice_zaurus.cpp | |||
@@ -438,49 +438,49 @@ bool Zaurus::setDisplayBrightness( int bright ) | |||
438 | } | 438 | } |
439 | } | 439 | } |
440 | return res; | 440 | return res; |
441 | } | 441 | } |
442 | 442 | ||
443 | bool Zaurus::setDisplayStatus( bool on ) | 443 | bool Zaurus::setDisplayStatus( bool on ) |
444 | { | 444 | { |
445 | bool res = false; | 445 | bool res = false; |
446 | if ( m_embedix ) | 446 | if ( m_embedix ) |
447 | { | 447 | { |
448 | int fd = ::open( SHARP_FL_IOCTL_DEVICE, O_WRONLY|O_NONBLOCK ); | 448 | int fd = ::open( SHARP_FL_IOCTL_DEVICE, O_WRONLY|O_NONBLOCK ); |
449 | if ( fd ) | 449 | if ( fd ) |
450 | { | 450 | { |
451 | int ioctlnum = on ? SHARP_FL_IOCTL_ON : SHARP_FL_IOCTL_OFF; | 451 | int ioctlnum = on ? SHARP_FL_IOCTL_ON : SHARP_FL_IOCTL_OFF; |
452 | res = ( ::ioctl ( fd, ioctlnum, 0 ) == 0 ); | 452 | res = ( ::ioctl ( fd, ioctlnum, 0 ) == 0 ); |
453 | ::close ( fd ); | 453 | ::close ( fd ); |
454 | } | 454 | } |
455 | } | 455 | } |
456 | else | 456 | else |
457 | { | 457 | { |
458 | int fd = ::open( "/sys/class/backlight/corgi-bl/power", O_WRONLY|O_NONBLOCK ); | 458 | int fd = ::open( "/sys/class/backlight/corgi-bl/power", O_WRONLY|O_NONBLOCK ); |
459 | if ( fd ) | 459 | if ( fd ) |
460 | { | 460 | { |
461 | char buf[10]; | 461 | char buf[10]; |
462 | buf[0] = on ? '1' : '0'; | 462 | buf[0] = on ? FB_BLANK_UNBLANK : FB_BLANK_POWERDOWN; |
463 | buf[1] = '\0'; | 463 | buf[1] = '\0'; |
464 | res = ( ::write( fd, &buf[0], 2 ) == 0 ); | 464 | res = ( ::write( fd, &buf[0], 2 ) == 0 ); |
465 | ::close( fd ); | 465 | ::close( fd ); |
466 | } | 466 | } |
467 | } | 467 | } |
468 | return res; | 468 | return res; |
469 | } | 469 | } |
470 | 470 | ||
471 | bool Zaurus::suspend() | 471 | bool Zaurus::suspend() |
472 | { | 472 | { |
473 | qDebug("ODevice::suspend"); | 473 | qDebug("ODevice::suspend"); |
474 | if ( !isQWS( ) ) // only qwsserver is allowed to suspend | 474 | if ( !isQWS( ) ) // only qwsserver is allowed to suspend |
475 | return false; | 475 | return false; |
476 | 476 | ||
477 | if ( d->m_model == Model_Unknown ) // better don't suspend in qvfb / on unkown devices | 477 | if ( d->m_model == Model_Unknown ) // better don't suspend in qvfb / on unkown devices |
478 | return false; | 478 | return false; |
479 | 479 | ||
480 | bool res = false; | 480 | bool res = false; |
481 | ODevice::sendSuspendmsg(); | 481 | ODevice::sendSuspendmsg(); |
482 | 482 | ||
483 | struct timeval tvs, tvn; | 483 | struct timeval tvs, tvn; |
484 | ::gettimeofday ( &tvs, 0 ); | 484 | ::gettimeofday ( &tvs, 0 ); |
485 | 485 | ||
486 | ::sync(); // flush fs caches | 486 | ::sync(); // flush fs caches |