rpms/ohm/OLPC-2 ohm-suspend-with-sysfs.patch,1.1,1.2

Marco Pesenti Gritti (mpg) fedora-extras-commits at redhat.com
Wed Jul 18 18:59:30 UTC 2007


Author: mpg

Update of /cvs/extras/rpms/ohm/OLPC-2
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv9941

Modified Files:
	ohm-suspend-with-sysfs.patch 
Log Message:
Update suspend patch to latest git

ohm-suspend-with-sysfs.patch:

Index: ohm-suspend-with-sysfs.patch
===================================================================
RCS file: /cvs/extras/rpms/ohm/OLPC-2/ohm-suspend-with-sysfs.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ohm-suspend-with-sysfs.patch	16 Jul 2007 02:31:23 -0000	1.1
+++ ohm-suspend-with-sysfs.patch	18 Jul 2007 18:59:27 -0000	1.2
@@ -1,5 +1,5 @@
 diff --git a/plugins/policy/suspend/ohm-plugin-suspend.c b/plugins/policy/suspend/ohm-plugin-suspend.c
-index 1e08298..8441a34 100644
+index 712464d..f889f0e 100644
 --- a/plugins/policy/suspend/ohm-plugin-suspend.c
 +++ b/plugins/policy/suspend/ohm-plugin-suspend.c
 @@ -18,8 +18,11 @@
@@ -14,7 +14,7 @@
  #include <ohm-plugin.h>
  #include <dbus/dbus-glib.h>
  
-@@ -38,33 +41,19 @@ enum {
+@@ -38,40 +41,26 @@ enum {
  static gboolean
  system_suspend (OhmPlugin *plugin)
  {
@@ -23,7 +23,11 @@
 -	GError *error;
 -	gboolean ret;
 -	gint retval;
--
++	FILE *fp;
+ 
+ 	/* Tell the DPMS plugin to kill the backlight. */
+ 	ohm_plugin_conf_set_key (plugin, "backlight.state", 0);
+ 
 -	connection = dbus_g_bus_get (DBUS_BUS_SYSTEM, NULL);
 -
 -	/* reuse the connection from HAL */
@@ -42,22 +46,27 @@
 -	if (error != NULL) {
 -		g_printerr ("Error: %s\n", error->message);
 -		g_error_free (error);
--	}
--	g_object_unref (proxy);
--	return ret;
-+	FILE *fp;
-+
 +	fp = g_fopen("/sys/power/state", "w");
 +	if (!fp) {
 +		g_warning ("Couldn't open /sys/power/state.");
 +		return FALSE;
-+	}
+ 	}
+-	g_object_unref (proxy);
 +
 +	if (g_fprintf(fp, "mem\n") < 0)
 +		g_warning ("Couldn't write to /sys/power/state.");
-+	
++
 +	fclose(fp);
-+	return TRUE; 
+ 
+ 	/* We've resumed now.  Bring the backlight back. */
+ 	ohm_plugin_conf_set_key (plugin, "backlight.state", 1);
+ 
+-	return ret;
++	return TRUE;
  }
  
  /**
+diff --git a/po/ChangeLog b/po/ChangeLog
+diff --git a/po/Makefile.in.in b/po/Makefile.in.in
+diff --git a/po/POTFILES.in b/po/POTFILES.in
+diff --git a/po/en_GB.po b/po/en_GB.po




More information about the fedora-extras-commits mailing list