diff options
author | leafnode | 2004-06-13 22:26:16 (GMT) |
---|---|---|
committer | cvs2git | 2012-06-24 12:13:13 (GMT) |
commit | 350f3af8ab55be560432c7619e1a54019ddeb3b7 (patch) | |
tree | 4f260891b82a1c6cc3f1d0486043a11a71a1f187 | |
parent | dbf5a22a8adcbcd856d1cf1ce8fadd77690b4147 (diff) | |
download | torsmo-350f3af8ab55be560432c7619e1a54019ddeb3b7.zip torsmo-350f3af8ab55be560432c7619e1a54019ddeb3b7.tar.gz |
- removed unnecessary patches - included in new software release (haha! Now try
to tell me that we don't send our patches to software developers!)
Changed files:
torsmo-battery.patch -> 1.2
torsmo-load.patch -> 1.2
-rw-r--r-- | torsmo-battery.patch | 96 | ||||
-rw-r--r-- | torsmo-load.patch | 21 |
2 files changed, 0 insertions, 117 deletions
diff --git a/torsmo-battery.patch b/torsmo-battery.patch deleted file mode 100644 index dd1f2a0..0000000 --- a/torsmo-battery.patch +++ /dev/null @@ -1,96 +0,0 @@ -diff -uNr torsmo-0.16-orig/linux.c torsmo-0.16/linux.c ---- torsmo-0.16-orig/linux.c 2004-05-14 00:02:55.000000000 +0200 -+++ torsmo-0.16/linux.c 2004-05-21 00:07:54.294243736 +0200 -@@ -395,7 +395,7 @@ - 2241<@jupet kellari ö> 1.16 1.2 0x03 0x00 0x00 0x01 99% -1 ? monitori päällä mutta ilman verkkovirtaa - */ - --#define ACPI_BATTERY_PATH "/proc/acpi/battery/BAT1/state" -+#define ACPI_BATTERY_BASE_PATH "/proc/acpi/battery" - #define APM_PATH "/proc/apm" - - static FILE *acpi_bat_fp; -@@ -407,8 +407,10 @@ - - static double last_battery_time; - --void get_battery_stuff(char *buf, unsigned int n) { -+void get_battery_stuff(char *buf, unsigned int n, unsigned int b) { - static int rep, rep2; -+ char acpi_path[128]; -+ snprintf(acpi_path, 127, "%s/BAT%d/state", ACPI_BATTERY_BASE_PATH, b); - - /* don't update battery too often */ - if (current_update_time - last_battery_time < 29.5) { -@@ -420,7 +422,7 @@ - /* first try ACPI */ - - if (acpi_bat_fp == NULL && apm_bat_fp == NULL) -- acpi_bat_fp = open_file(ACPI_BATTERY_PATH, &rep); -+ acpi_bat_fp = open_file(acpi_path, &rep); - - if (acpi_bat_fp != NULL) { - int present_rate = -1; -@@ -430,7 +432,7 @@ - /* read last full capacity if it's zero */ - if (acpi_last_full == 0) { - static int rep; -- FILE *fp = open_file("/proc/acpi/battery/BAT1/info", &rep); -+ FILE *fp = open_file(acpi_path, &rep); - if (fp != NULL) { - while (!feof(fp)) { - char b[256]; -diff -uNr torsmo-0.16-orig/torsmo.c torsmo-0.16/torsmo.c ---- torsmo-0.16-orig/torsmo.c 2004-05-13 23:31:04.000000000 +0200 -+++ torsmo-0.16/torsmo.c 2004-05-21 00:06:49.443102608 +0200 -@@ -453,6 +453,7 @@ - union { - char *s; - int i; -+ int b; // battery number - long l; - struct net_stat *net; - struct { -@@ -518,6 +519,13 @@ - OBJ(acpitemp) - END - OBJ(battery) -+ int no; -+ if (arg) { -+ sscanf(arg, "%d", &no); -+ } else { -+ no = 0; -+ } -+ obj->data.b = no; - END - OBJ(cpu) - need_cpu_usage = 1; -@@ -872,7 +880,7 @@ - snprintf(p, n, "%d", (int) get_acpi_temperature()); - } - OBJ(battery) { -- get_battery_stuff(p, n); -+ get_battery_stuff(p, n, obj->data.b); - } - OBJ(cpu) { - snprintf(p, n, "%d", (int) (cpu_usage*100.0)); -@@ -1848,7 +1856,6 @@ - - int main(int argc, char **argv) { - /* handle command line parameters that don't change configs */ -- - while (1) { - int c = getopt(argc, argv, getopt_string); - if (c == -1) break; -diff -uNr torsmo-0.16-orig/torsmo.h torsmo-0.16/torsmo.h ---- torsmo-0.16-orig/torsmo.h 2004-05-13 21:52:14.000000000 +0200 -+++ torsmo-0.16/torsmo.h 2004-05-20 23:32:51.000000000 +0200 -@@ -30,7 +30,7 @@ - double get_i2c_info(int *fd, const char *dev, const char *type, int n); - void get_load_average(double v[3]); - double get_acpi_temperature(void); --void get_battery_stuff(char *buf, unsigned int n); -+void get_battery_stuff(char *buf, unsigned int n, unsigned int b); - - /* in torsmo.c */ - diff --git a/torsmo-load.patch b/torsmo-load.patch deleted file mode 100644 index b296abf..0000000 --- a/torsmo-load.patch +++ /dev/null @@ -1,21 +0,0 @@ ---- torsmo-0.16-orig/torsmo.c 2004-05-21 00:14:44.675856248 +0200 -+++ torsmo-0.16/torsmo.c 2004-05-21 00:17:02.518900920 +0200 -@@ -910,13 +910,13 @@ - get_load_average(v); - - if (obj->data.loadavg[2]) -- snprintf(p, n, "%.2f %.2f %.2f", v[obj->data.loadavg[0]-1], -- v[obj->data.loadavg[1]-1], v[obj->data.loadavg[2]-1]); -+ snprintf(p, n, "%.2f %.2f %.2f", v[obj->data.loadavg[0]], -+ v[obj->data.loadavg[1]], v[obj->data.loadavg[2]]); - else if (obj->data.loadavg[1]) -- snprintf(p, n, "%.2f %.2f", v[obj->data.loadavg[0]-1], -- v[obj->data.loadavg[1]-1]); -+ snprintf(p, n, "%.2f %.2f", v[obj->data.loadavg[0]], -+ v[obj->data.loadavg[1]]); - else if (obj->data.loadavg[0]) -- snprintf(p, n, "%.2f", v[obj->data.loadavg[0]-1]); -+ snprintf(p, n, "%.2f", v[obj->data.loadavg[0]]); - } - OBJ(hr) { - new_hr(p, obj->data.i); |