summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--libopie/odevice.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/libopie/odevice.cpp b/libopie/odevice.cpp
index 55ba7bd..cea4f35 100644
--- a/libopie/odevice.cpp
+++ b/libopie/odevice.cpp
@@ -1124,16 +1124,18 @@ typedef struct sharp_led_status {
#define FL_IOCTL_STEP_CONTRAST 100
void Zaurus::buzzer ( int sound )
{
- static int fd = ::open ( "/dev/sharp_buz", O_RDWR|O_NONBLOCK );
+ static int fd = ::open ( "/dev/sharp_buz", O_WRONLY|O_NONBLOCK );
- if ( fd >= 0 )
+ if ( fd >= 0 ) {
::ioctl ( fd, SHARP_BUZZER_MAKESOUND, sound );
+ ::close ( fd );
+ }
}
void Zaurus::alarmSound ( )
{
buzzer ( SHARP_BUZ_SCHEDULE_ALARM );