[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    kdeutils/klaptopdaemon
From:       Adriaan de Groot <groot () kde ! org>
Date:       2005-04-05 21:10:45
Message-ID: 20050405211045.34FF563E () office ! kde ! org
[Download RAW message or body]

CVS commit by adridg: 

Prefer scripts suspend or hibernate over direct access to
/proc/acpi/sleep, as noted in the patch attached to the bug report.
The patch has been munged somewhat, though.
BUGS:93533


  M +3 -0      acpi_helper.cpp   1.19


--- kdeutils/klaptopdaemon/acpi_helper.cpp  #1.18:1.19
@@ -115,4 +115,6 @@ main(int argc, char **argv)
         for (i = 1; i < argc; i++)
         if (strcmp(argv[i], "--suspend") == 0 || strcmp(argv[i], "-suspend") == 0) {
+                /* Returns only if suspend does not exist. */
+                run_program("/usr/sbin/suspend");
                 write_to_proc_sleep(3);
                 exit(0);
@@ -127,4 +129,5 @@ main(int argc, char **argv)
         } else
         if (strcmp(argv[i], "--hibernate") == 0 || strcmp(argv[i], "-hibernate") == 0) {
+                run_program("/usr/sbin/hibernate");
                 write_to_proc_sleep(4);
                 exit(0);


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic