[Pommed-commits] [SCM] pommed - hotkeys handler for Apple laptops branch, master, updated. 1.34-2-g4ed1c82

Julien BLACHE jb at jblache.org
Tue Sep 7 16:03:13 UTC 2010


The following commit has been merged in the master branch:
commit 4ed1c823372b06224b9177f85ae1092d1784c447
Author: Julien BLACHE <jb at jblache.org>
Date:   Tue Sep 7 18:01:31 2010 +0200

    Fix crash if no fnmode sysfs node found
    
    Reported by Ignacy Gawedzki <i at qult.net>.

diff --git a/ChangeLog b/ChangeLog
index c5aa73f..7b84018 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,7 @@ ChangeLog for pommed
 --------------------
 
 version 1.35:
+	- pommed: fix crash if no fnmode sysfs node found.
 
 version 1.34:
 	- pommed: be more careful when invoking eject (Alioth #312213).
diff --git a/pommed/pommed.c b/pommed/pommed.c
index 7d3c196..97ad7dc 100644
--- a/pommed/pommed.c
+++ b/pommed/pommed.c
@@ -463,6 +463,12 @@ kbd_set_fnmode(void)
       return;
     }
 
+  if (!fp)
+    {
+      logmsg(LOG_INFO, "Could not set fnmode: no sysfs node found!");
+      return;
+    }
+
   fprintf(fp, "%d", general_cfg.fnmode);
 
   fclose(fp);

-- 
pommed - hotkeys handler for Apple laptops



More information about the Pommed-commits mailing list