r10395 - in /desktop/unstable/gnome-applets/debian: changelog patches/60_acpi-info-missing.patch

lool at users.alioth.debian.org lool at users.alioth.debian.org
Wed Apr 25 09:51:02 UTC 2007


Author: lool
Date: Wed Apr 25 09:51:01 2007
New Revision: 10395

URL: http://svn.debian.org/wsvn/pkg-gnome/?sc=1&rev=10395
Log:
* New patch, 60_acpi-info-missing, fixes crash when /proc/acpi/info is
  missing, as will soon be the case in new kernels; GNOME #427562;
  closes: #418992.

Added:
    desktop/unstable/gnome-applets/debian/patches/60_acpi-info-missing.patch
Modified:
    desktop/unstable/gnome-applets/debian/changelog

Modified: desktop/unstable/gnome-applets/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/gnome-applets/debian/changelog?rev=10395&op=diff
==============================================================================
--- desktop/unstable/gnome-applets/debian/changelog (original)
+++ desktop/unstable/gnome-applets/debian/changelog Wed Apr 25 09:51:01 2007
@@ -1,12 +1,15 @@
-gnome-applets (2.18.0-2) UNRELEASED; urgency=low
+gnome-applets (2.18.0-2) unstable; urgency=low
 
   * Build-depend on libgucharmap5-dev instead of libgucharmap4-dev.
   * Upload to unstable; drop check-dist include.
   * Wrap build-deps and deps.
   * Add ${misc:Depends}.
   * Cleanups.
-
- -- Loic Minier <lool at dooz.org>  Wed, 25 Apr 2007 11:40:08 +0200
+  * New patch, 60_acpi-info-missing, fixes crash when /proc/acpi/info is
+    missing, as will soon be the case in new kernels; GNOME #427562;
+    closes: #418992.
+
+ -- Loic Minier <lool at dooz.org>  Wed, 25 Apr 2007 11:44:12 +0200
 
 gnome-applets (2.18.0-1) experimental; urgency=low
 

Added: desktop/unstable/gnome-applets/debian/patches/60_acpi-info-missing.patch
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/gnome-applets/debian/patches/60_acpi-info-missing.patch?rev=10395&op=file
==============================================================================
--- desktop/unstable/gnome-applets/debian/patches/60_acpi-info-missing.patch (added)
+++ desktop/unstable/gnome-applets/debian/patches/60_acpi-info-missing.patch Wed Apr 25 09:51:01 2007
@@ -1,0 +1,42 @@
+GNOME #427562; Debian #418992; fixes crash when /proc/acpi/info is missing,
+as will soon be the case with new kernels.
+
+diff -Nur gnome-applets-2.18.0/battstat/acpi-linux.c gnome-applets-2.18.0.new/battstat/acpi-linux.c
+--- gnome-applets-2.18.0/battstat/acpi-linux.c	2006-12-31 03:14:45.000000000 +0100
++++ gnome-applets-2.18.0.new/battstat/acpi-linux.c	2007-04-25 11:48:26.000000000 +0200
+@@ -200,22 +200,21 @@
+   acpiinfo->max_capacity = 0;
+   acpiinfo->low_capacity = 0;
+   acpiinfo->critical_capacity = 0;
++  acpiinfo->ac_state_state = "state";
++  acpiinfo->batt_state_state = "state";
++  acpiinfo->charging_state = "charging state";
+ 
+   hash = read_file ("/proc/acpi/info", buf, sizeof (buf));
+-  if (!hash)
+-    return FALSE;
+-
+-  acpi_ver = read_ulong (hash, "version");
+-  g_hash_table_destroy (hash);
+-
+-  if (acpi_ver < (gulong)20020208) {
+-    acpiinfo->ac_state_state = "status";
+-    acpiinfo->batt_state_state = "status";
+-    acpiinfo->charging_state = "state";
+-  } else {
+-    acpiinfo->ac_state_state = "state";
+-    acpiinfo->batt_state_state = "state";
+-    acpiinfo->charging_state = "charging state";
++  if (hash)
++  {
++	  acpi_ver = read_ulong (hash, "version");
++	  g_hash_table_destroy (hash);
++
++	  if (acpi_ver < (gulong)20020208) {
++		  acpiinfo->ac_state_state = "status";
++		  acpiinfo->batt_state_state = "status";
++		  acpiinfo->charging_state = "state";
++	  }
+   }
+ 
+   procdir=opendir("/proc/acpi/battery/");




More information about the pkg-gnome-commits mailing list