summaryrefslogtreecommitdiff
path: root/libopie/odevice.cpp
Unidiff
Diffstat (limited to 'libopie/odevice.cpp') (more/less context) (show whitespace changes)
-rw-r--r--libopie/odevice.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/libopie/odevice.cpp b/libopie/odevice.cpp
index 057c344..bf64676 100644
--- a/libopie/odevice.cpp
+++ b/libopie/odevice.cpp
@@ -303,13 +303,14 @@ void ODeviceIPAQ::tstp_sighandler ( int )
303 303
304bool ODeviceIPAQ::suspend ( ) 304bool ODeviceIPAQ::suspend ( )
305{ 305{
306 int fd; 306 int fd;
307 bool res = false; 307 bool res = false;
308 308
309 if (( fd = ::open ( "/dev/apm_bios", O_RDWR )) >= 0 ) { 309 if ((( fd = ::open ( "/dev/apm_bios", O_RDWR )) >= 0 ) ||
310 (( fd = ::open ( "/dev/misc/apm_bios",O_RDWR )) >= 0 )) {
310 struct timeval tvs, tvn; 311 struct timeval tvs, tvn;
311 312
312 ::signal ( SIGTSTP, tstp_sighandler ); 313 ::signal ( SIGTSTP, tstp_sighandler );
313 ::gettimeofday ( &tvs, 0 ); 314 ::gettimeofday ( &tvs, 0 );
314 315
315 res = ( ::ioctl ( fd, APM_IOC_SUSPEND ) == 0 ); 316 res = ( ::ioctl ( fd, APM_IOC_SUSPEND ) == 0 );
@@ -325,12 +326,13 @@ bool ODeviceIPAQ::suspend ( )
325 326
326 ::kill ( -::getpid ( ), SIGCONT ); 327 ::kill ( -::getpid ( ), SIGCONT );
327 } 328 }
328 329
329 ::signal ( SIGTSTP, SIG_DFL ); 330 ::signal ( SIGTSTP, SIG_DFL );
330 } 331 }
332
331 return res; 333 return res;
332} 334}
333 335
334 336
335void ODeviceIPAQ::alarmSound ( ) 337void ODeviceIPAQ::alarmSound ( )
336{ 338{