FreeBSD Bugzilla – Attachment 55348 Details for
Bug 83672
acpiconf with remaining battery life and time
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 1000 bytes, created by
Rudolf Čejka
on 2005-07-18 15:40:33 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
Rudolf Čejka
Created:
2005-07-18 15:40:33 UTC
Size:
1000 bytes
patch
obsolete
>--- usr.sbin/acpi/acpiconf/acpiconf.c.orig Sun Jul 17 16:40:29 2005 >+++ usr.sbin/acpi/acpiconf/acpiconf.c Sun Jul 17 16:41:37 2005 >@@ -90,7 +90,7 @@ > acpi_battinfo(int num) > { > union acpi_battery_ioctl_arg battio; >- const char *pwr_units; >+ const char *pwr_units, *pwr_units2; > u_int32_t dcap; > int h, m, s; > >@@ -101,10 +101,13 @@ > if (ioctl(acpifd, ACPIIO_BATT_GET_BIF, &battio) == -1) > err(EX_IOERR, "get battery info (%d) failed", num); > printf("Battery %d information\n", num); >- if (battio.bif.units == 0) >+ if (battio.bif.units == 0) { > pwr_units = "mWh"; >- else >+ pwr_units2 = "mW"; >+ } else { > pwr_units = "mAh"; >+ pwr_units2 = "mA"; >+ } > > if (battio.bif.dcap == UNKNOWN_CAP) > printf("Design capacity:\tUnknown\n"); >@@ -148,7 +151,7 @@ > printf("Present rate:\t\tUnknown\n"); > else > printf("Present rate:\t\t%d %s\n", battio.bst.rate, >- pwr_units); >+ pwr_units2); > if (battio.bst.cap == UNKNOWN_CAP) > printf("Remaining capacity:\tUnknown\n"); > else
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 83672
:
55345
|
55346
|
55347
| 55348