r4471 - trunk/src/target/OM-2007.2/daemons/neod/src

julian_chu at docs.openmoko.org julian_chu at docs.openmoko.org
Tue Jun 3 06:47:28 CEST 2008


Author: julian_chu
Date: 2008-06-03 06:47:27 +0200 (Tue, 03 Jun 2008)
New Revision: 4471

Modified:
   trunk/src/target/OM-2007.2/daemons/neod/src/buttonactions.c
Log:
*modify src/buttonactions.c to make neod use the apm command to suspend the host rather than writing directly to sysfs. Patch by Mike Westerhof: Thanks!


Modified: trunk/src/target/OM-2007.2/daemons/neod/src/buttonactions.c
===================================================================
--- trunk/src/target/OM-2007.2/daemons/neod/src/buttonactions.c	2008-06-02 18:20:46 UTC (rev 4470)
+++ trunk/src/target/OM-2007.2/daemons/neod/src/buttonactions.c	2008-06-03 04:47:27 UTC (rev 4471)
@@ -569,6 +569,12 @@
 void neod_buttonactions_popup_selected_lock( GtkWidget* button, gpointer user_data )
 {
     gtk_widget_hide( power_menu );
+
+    if (getenv("DO_NOT_USE_APM") == NULL) {
+           system("/usr/bin/apm -s");
+           return;
+    }
+
     int fd = open( "/sys/power/state", O_WRONLY );
     if ( fd != -1 )
     {





More information about the commitlog mailing list