author | kergoth <kergoth> | 2002-09-27 23:35:30 (UTC) |
---|---|---|
committer | kergoth <kergoth> | 2002-09-27 23:35:30 (UTC) |
commit | 996c0d02d16c185acc3190baa5b4a1fc934e730c (patch) (unidiff) | |
tree | 837e0d9f0fef522964d28e3e841686d63521dadd | |
parent | d7bcdda1857ff31830705921d8248200d881cf93 (diff) | |
download | opie-996c0d02d16c185acc3190baa5b4a1fc934e730c.zip opie-996c0d02d16c185acc3190baa5b4a1fc934e730c.tar.gz opie-996c0d02d16c185acc3190baa5b4a1fc934e730c.tar.bz2 |
Check for /etc/oz_version.. tired of seeing OpenZaurus v0.0 in opie-login.
-rw-r--r-- | libopie/odevice.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libopie/odevice.cpp b/libopie/odevice.cpp index 9871e80..3bc1e0c 100644 --- a/libopie/odevice.cpp +++ b/libopie/odevice.cpp | |||
@@ -520,70 +520,78 @@ bool ODeviceIPAQ::setDisplayBrightness ( int bright ) | |||
520 | } | 520 | } |
521 | return res; | 521 | return res; |
522 | } | 522 | } |
523 | 523 | ||
524 | int ODeviceIPAQ::displayBrightnessResolution ( ) const | 524 | int ODeviceIPAQ::displayBrightnessResolution ( ) const |
525 | { | 525 | { |
526 | return 255; // really 128, but logarithmic control is smoother this way | 526 | return 255; // really 128, but logarithmic control is smoother this way |
527 | } | 527 | } |
528 | 528 | ||
529 | 529 | ||
530 | /************************************************** | 530 | /************************************************** |
531 | * | 531 | * |
532 | * Zaurus | 532 | * Zaurus |
533 | * | 533 | * |
534 | **************************************************/ | 534 | **************************************************/ |
535 | 535 | ||
536 | 536 | ||
537 | 537 | ||
538 | void ODeviceZaurus::init ( ) | 538 | void ODeviceZaurus::init ( ) |
539 | { | 539 | { |
540 | d-> m_modelstr = "Zaurus SL5000"; | 540 | d-> m_modelstr = "Zaurus SL5000"; |
541 | d-> m_model = OMODEL_Zaurus_SL5000; | 541 | d-> m_model = OMODEL_Zaurus_SL5000; |
542 | d-> m_vendorstr = "Sharp"; | 542 | d-> m_vendorstr = "Sharp"; |
543 | d-> m_vendor = OVENDOR_Sharp; | 543 | d-> m_vendor = OVENDOR_Sharp; |
544 | 544 | ||
545 | QFile f ( "/proc/filesystems" ); | 545 | QFile f ( "/proc/filesystems" ); |
546 | 546 | ||
547 | if ( f. open ( IO_ReadOnly ) && ( QTextStream ( &f ). read ( ). find ( "\tjffs2\n" ) >= 0 )) { | 547 | if ( f. open ( IO_ReadOnly ) && ( QTextStream ( &f ). read ( ). find ( "\tjffs2\n" ) >= 0 )) { |
548 | d-> m_systemstr = "OpenZaurus"; | 548 | d-> m_systemstr = "OpenZaurus"; |
549 | d-> m_system = OSYSTEM_OpenZaurus; | 549 | d-> m_system = OSYSTEM_OpenZaurus; |
550 | 550 | ||
551 | f. close ( ); | 551 | f. close ( ); |
552 | |||
553 | f. setName ( "/etc/oz_version" ); | ||
554 | if ( f. open ( IO_ReadOnly )) { | ||
555 | QTextStream ts ( &f ); | ||
556 | d-> m_sysverstr = ts. readLine ( ). mid ( 10 ); | ||
557 | f. close ( ); | ||
558 | } | ||
552 | } | 559 | } |
553 | else { | 560 | else { |
554 | d-> m_systemstr = "Zaurus"; | 561 | d-> m_systemstr = "Zaurus"; |
555 | d-> m_system = OSYSTEM_Zaurus; | 562 | d-> m_system = OSYSTEM_Zaurus; |
556 | } | 563 | } |
557 | 564 | ||
565 | |||
558 | d-> m_leds [0] = OLED_Off; | 566 | d-> m_leds [0] = OLED_Off; |
559 | } | 567 | } |
560 | 568 | ||
561 | #include <unistd.h> | 569 | #include <unistd.h> |
562 | #include <fcntl.h> | 570 | #include <fcntl.h> |
563 | #include <sys/ioctl.h> | 571 | #include <sys/ioctl.h> |
564 | 572 | ||
565 | //#include <asm/sharp_char.h> // including kernel headers is evil ... | 573 | //#include <asm/sharp_char.h> // including kernel headers is evil ... |
566 | 574 | ||
567 | #define SHARP_DEV_IOCTL_COMMAND_START 0x5680 | 575 | #define SHARP_DEV_IOCTL_COMMAND_START 0x5680 |
568 | 576 | ||
569 | #defineSHARP_BUZZER_IOCTL_START (SHARP_DEV_IOCTL_COMMAND_START) | 577 | #defineSHARP_BUZZER_IOCTL_START (SHARP_DEV_IOCTL_COMMAND_START) |
570 | #define SHARP_BUZZER_MAKESOUND (SHARP_BUZZER_IOCTL_START) | 578 | #define SHARP_BUZZER_MAKESOUND (SHARP_BUZZER_IOCTL_START) |
571 | 579 | ||
572 | #define SHARP_BUZ_TOUCHSOUND 1 /* touch panel sound */ | 580 | #define SHARP_BUZ_TOUCHSOUND 1 /* touch panel sound */ |
573 | #define SHARP_BUZ_KEYSOUND 2 /* key sound */ | 581 | #define SHARP_BUZ_KEYSOUND 2 /* key sound */ |
574 | #define SHARP_BUZ_SCHEDULE_ALARM 11 /* schedule alarm */ | 582 | #define SHARP_BUZ_SCHEDULE_ALARM 11 /* schedule alarm */ |
575 | 583 | ||
576 | /* --- for SHARP_BUZZER device --- */ | 584 | /* --- for SHARP_BUZZER device --- */ |
577 | 585 | ||
578 | //#defineSHARP_BUZZER_IOCTL_START (SHARP_DEV_IOCTL_COMMAND_START) | 586 | //#defineSHARP_BUZZER_IOCTL_START (SHARP_DEV_IOCTL_COMMAND_START) |
579 | //#define SHARP_BUZZER_MAKESOUND (SHARP_BUZZER_IOCTL_START) | 587 | //#define SHARP_BUZZER_MAKESOUND (SHARP_BUZZER_IOCTL_START) |
580 | 588 | ||
581 | #define SHARP_BUZZER_SETVOLUME (SHARP_BUZZER_IOCTL_START+1) | 589 | #define SHARP_BUZZER_SETVOLUME (SHARP_BUZZER_IOCTL_START+1) |
582 | #define SHARP_BUZZER_GETVOLUME (SHARP_BUZZER_IOCTL_START+2) | 590 | #define SHARP_BUZZER_GETVOLUME (SHARP_BUZZER_IOCTL_START+2) |
583 | #define SHARP_BUZZER_ISSUPPORTED (SHARP_BUZZER_IOCTL_START+3) | 591 | #define SHARP_BUZZER_ISSUPPORTED (SHARP_BUZZER_IOCTL_START+3) |
584 | #define SHARP_BUZZER_SETMUTE (SHARP_BUZZER_IOCTL_START+4) | 592 | #define SHARP_BUZZER_SETMUTE (SHARP_BUZZER_IOCTL_START+4) |
585 | #define SHARP_BUZZER_STOPSOUND (SHARP_BUZZER_IOCTL_START+5) | 593 | #define SHARP_BUZZER_STOPSOUND (SHARP_BUZZER_IOCTL_START+5) |
586 | 594 | ||
587 | //#define SHARP_BUZ_TOUCHSOUND 1 /* touch panel sound */ | 595 | //#define SHARP_BUZ_TOUCHSOUND 1 /* touch panel sound */ |
588 | //#define SHARP_BUZ_KEYSOUND 2 /* key sound */ | 596 | //#define SHARP_BUZ_KEYSOUND 2 /* key sound */ |
589 | 597 | ||