aboutsummaryrefslogtreecommitdiffstats
path: root/sysutils/asapm/files
diff options
context:
space:
mode:
authorflz <flz@FreeBSD.org>2005-06-01 01:37:12 +0800
committerflz <flz@FreeBSD.org>2005-06-01 01:37:12 +0800
commite9dbfcbb92b7e065eb885113d798dbf30f809623 (patch)
tree4bf0fedf4401d7f11e51b90f4aefcf093e835294 /sysutils/asapm/files
parent291882bd705189b8492aa36be6b57b03e8c22427 (diff)
downloadfreebsd-ports-gnome-e9dbfcbb92b7e065eb885113d798dbf30f809623.tar.gz
freebsd-ports-gnome-e9dbfcbb92b7e065eb885113d798dbf30f809623.tar.zst
freebsd-ports-gnome-e9dbfcbb92b7e065eb885113d798dbf30f809623.zip
- Update to 3.0.
PR: ports/81728 Submitted by: Ports Fury
Diffstat (limited to 'sysutils/asapm/files')
-rw-r--r--sysutils/asapm/files/patch-apm_read.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/sysutils/asapm/files/patch-apm_read.c b/sysutils/asapm/files/patch-apm_read.c
new file mode 100644
index 000000000000..d89e2d64a0ee
--- /dev/null
+++ b/sysutils/asapm/files/patch-apm_read.c
@@ -0,0 +1,29 @@
+--- apm_read.c.orig Tue May 17 06:49:13 2005
++++ apm_read.c Sun May 29 20:38:24 2005
+@@ -301,6 +301,9 @@
+ unsigned int remaining_capacity = 0;
+ unsigned int present_rate = 0;
+
++ unsigned int percent;
++ unsigned int time_left;
++
+ /* First check if there is an ACPI system */
+ if ((fd = open("/proc/acpi/info", O_RDONLY)) == -1) {
+ error_handle(1, "open_acpi_info_file");
+@@ -503,7 +506,7 @@
+ * Calculate the percentage and time to full charge
+ * or discharge based on the reported rate.
+ */
+- unsigned int percent =
++ percent =
+ last_full_capacity ?
+ (float)remaining_capacity / (float)last_full_capacity * 100
+ : 0;
+@@ -512,7 +515,6 @@
+ ++state.update;
+ }
+
+- unsigned int time_left;
+ if ( state.battery_status == BATTERY_CHARGING ) {
+ time_left =
+ present_rate ?