[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#412605: marked as done (wmacpi fails to start with latest 2.6 kernels)



Your message dated Tue, 22 May 2007 12:17:07 +0000
with message-id <E1HqTIZ-0001yh-Tj@ries.debian.org>
and subject line Bug#412605: fixed in wmacpi 2.1-9
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--- Begin Message ---
Package: wmacpi
Version: 2.1-6

With the latest 2.6 Linux kernels, when the deprecated CONFIG_ACPI_PROCFS is
not selected, wmacpi fails to start because /proc/acpi/info doesn't exist.

Instaed, wmacpi should read /sys/module/acpi/parameters/acpica_version.
I am attaching a patch to this mail that fixes this problem while keeping
backward compatibility with systems where /proc/acpi/info exists.

This bug report is also sent to the upstream maintainer. 

---
 libacpi.c |   18 ++++++++++++------
 1 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/libacpi.c b/libacpi.c
index 6ea74d6..b4e9dce 100644
--- a/libacpi.c
+++ b/libacpi.c
@@ -139,15 +139,20 @@ int power_init(global_t *globals)
     char buf[4096];
     int acpi_ver = 0;
     int retval;
-
-    if (!(acpi = fopen("/proc/acpi/info", "r"))) {
-	pfatal("This system does not support ACPI\n");
-	return 1;
+    unsigned int version_offset = 0;
+
+    if (!(acpi = fopen("/sys/module/acpi/parameters/acpica_version", "r"))) {
+	    if (!(acpi = fopen("/proc/acpi/info", "r"))) {
+		    pfatal("This system does not support ACPI\n");
+		    return 1;
+	    } else {
+		    version_offset = 25;
+	    }
     }
 
     /* okay, now see if we got the right version */
     fread(buf, 4096, 1, acpi);
-    acpi_ver = strtol(buf + 25, NULL, 10);
+    acpi_ver = strtol(buf + version_offset, NULL, 10);
     pinfo("ACPI version detected: %d\n", acpi_ver);
     if (acpi_ver < 20020214) {
 	pfatal("This version requires ACPI subsystem version 20020214\n");
@@ -169,7 +174,8 @@ int power_reinit(global_t *globals)
     FILE *acpi;
     int retval;
 
-    if (!(acpi = fopen("/proc/acpi/info", "r"))) {
+    if (!(acpi = fopen("/proc/acpi/info", "r")) &&
+	!(acpi = fopen("/sys/module/acpi/parameters/acpica_version", "r"))) {
 	pfatal("Could not reopen ACPI info file - does this system support ACPI?\n");
 	return 1;
     }
-- 
1.4.4.4



--- End Message ---
--- Begin Message ---
Source: wmacpi
Source-Version: 2.1-9

We believe that the bug you reported is fixed in the latest version of
wmacpi, which is due to be installed in the Debian FTP archive:

wmacpi_2.1-9.diff.gz
  to pool/main/w/wmacpi/wmacpi_2.1-9.diff.gz
wmacpi_2.1-9.dsc
  to pool/main/w/wmacpi/wmacpi_2.1-9.dsc
wmacpi_2.1-9_i386.deb
  to pool/main/w/wmacpi/wmacpi_2.1-9_i386.deb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 412605@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Guillem Jover <guillem@debian.org> (supplier of updated wmacpi package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Tue, 22 May 2007 14:47:25 +0300
Source: wmacpi
Binary: wmacpi
Architecture: source i386
Version: 2.1-9
Distribution: unstable
Urgency: low
Maintainer: Debian QA Group <packages@qa.debian.org>
Changed-By: Guillem Jover <guillem@debian.org>
Description: 
 wmacpi     - ACPI battery monitor for WindowMaker
Closes: 412605
Changes: 
 wmacpi (2.1-9) unstable; urgency=low
 .
   * QA upload.
   * Add support for the new Linux 2.6 ACPI sysfs hierarchy. (Closes: #412605)
     Thanks to Samuel â??the sharkâ?? Ortiz <samuel@sortiz.org>.
   * Remove initial preposition from the short description.
   * Update watch file to version 3 (no changes needed).
   * Change x-dev Build-Depends to x11proto-core-dev.
   * Add missing Build-Depends x11proto-xext-dev and libxpm-dev.
   * Do not use '/usr/X11R6/lib' and '/usr/X11R6/include' when compiling.
   * Do not complain if the dependency files (.d) are not found when including
     them in the Makefile.
   * Clean up debian/copyright:
     - Use 'License' instead of 'Copyright'.
     - Add a new 'Upstream authors' section heading.
   * Clean up debian/rules:
     - Remove empty configure target.
     - Move duped cflags assignments in noopt to a common assignment.
     - Do not use a build-stamp file.
     - Remove boilerplate comments.
     - Add build-indep and build-arch targets. Make build depend on both.
     - Rename install to install-arch, make it depend on build-arch.
     - Change binary-indep to not depend on anything.
     - Change binary-arch to depend on install-arch.
Files: 
 ef57deca30899038b7a2b2a7fde74e94 655 x11 extra wmacpi_2.1-9.dsc
 bcf98b46c452ba69ede408cfec63041d 8104 x11 extra wmacpi_2.1-9.diff.gz
 8495a0d0424c8ed9259877b10e308adc 28470 x11 extra wmacpi_2.1-9_i386.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFGUtsNuW9ciZ2SjJsRAk1lAJwJA4/4xPKkS3HLjqfWs3ucbcG6GQCcCE/l
OSYxSNJqKiQ8FaBZlBZJzu8=
=Pfp6
-----END PGP SIGNATURE-----


--- End Message ---

Reply to: