diff -Nur torsmo-0.17.orig/linux.c torsmo-0.17/linux.c
--- torsmo-0.17.orig/linux.c	2004-05-25 10:57:19.000000000 +0200
+++ torsmo-0.17/linux.c	2004-07-05 21:42:34.000000000 +0200
@@ -488,10 +488,10 @@
 
 static double last_battery_time;
 
-void get_battery_stuff(char *buf, unsigned int n, int b) {
+void get_battery_stuff(char *buf, unsigned int n, char * b) {
   static int rep, rep2;
   char acpi_path[128];
-  snprintf(acpi_path, 127, ACPI_BATTERY_BASE_PATH "/BAT%d/state", b);
+  snprintf(acpi_path, 127, ACPI_BATTERY_BASE_PATH "/%s/state", b);
 
   /* don't update battery too often */
   if (current_update_time - last_battery_time < 29.5) {
diff -Nur torsmo-0.17.orig/torsmo.c torsmo-0.17/torsmo.c
--- torsmo-0.17.orig/torsmo.c	2004-05-25 12:58:51.000000000 +0200
+++ torsmo-0.17/torsmo.c	2004-07-05 21:42:46.000000000 +0200
@@ -479,7 +479,7 @@
   union {
     char *s;
     int i;
-    int b; // battery number
+    char * b; // battery name and number
     long l;
     struct net_stat *net;
     struct fs_stat *fs;
@@ -573,13 +573,13 @@
   OBJ(acpifan)
   END
   OBJ(battery)
-    int no;
+    char no[4];
     if (arg) {
-      sscanf(arg, "%d", &no);
+			strcpy(no, arg);
     } else {
-       no = 0;
+			strcpy(no, "BAT0");
     }
-    obj->data.b = no;
+    obj->data.b = strdup(no);
   END
   OBJ(buffers)
     need_meminfo = 1;
diff -Nur torsmo-0.17.orig/torsmo.h torsmo-0.17/torsmo.h
--- torsmo-0.17.orig/torsmo.h	2004-05-25 10:57:36.000000000 +0200
+++ torsmo-0.17/torsmo.h	2004-07-05 21:22:27.000000000 +0200
@@ -44,7 +44,7 @@
 double get_acpi_temperature(int fd);
 char* get_acpi_ac_adapter(void);
 char* get_acpi_fan(void);
-void get_battery_stuff(char *buf, unsigned int n, int b);
+void get_battery_stuff(char *buf, unsigned int n, char * b);
 
 /* fs-stuff is possibly system dependant (fs.c) */
 
