[PlanetCCRMA] acpi patch

jfm3 jfm3@ouroboros-complex.org
Mon Feb 23 09:42:01 2004


--=-3v9xLhqvns92R67DPbt0
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

This simple patch makes the acpi package build and work on FC1.

Not that it's a particularly useful utility.
-- 
(jfm3)

--=-3v9xLhqvns92R67DPbt0
Content-Disposition: attachment; filename=acpi.patch
Content-Type: text/x-patch; name=acpi.patch; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

diff -Naur acpi/main.c acpi.new/main.c
--- acpi/main.c	2002-07-23 16:09:22.000000000 -0400
+++ acpi.new/main.c	2004-02-22 20:10:10.000000000 -0500
@@ -56,45 +56,14 @@
=20
 static int version(void)
 {
-    printf(ACPI_VERSION_STRING """
-
-Copyright (C) 2001 Grahame Bowland.
-This is free software; see the source for copying conditions.  There is NO
-warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE=
.
-""");
+    printf("%s %s\n", ACPI_VERSION_STRING, "Copyright (C) 2001 Grahame Bow=
land.\nThis is free software; see the source for copying conditions.  There=
 is NO\nwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR =
PURPOSE.");
     return 1;
 }
=20
=20
 static int usage(char *argv[])
 {
-    printf("""\
-Usage: acpi [OPTION]...
-Shows information from the /proc filesystem, such as battery status or=20
-thermal information.
-
-  -b, --battery                battery information
-  -B, --without-battery        suppress battery information
-  -t, --thermal                thermal information
-  -T, --without-thermal        suppress thermal information
-  -a, --ac-adapter             ac adapter information
-  -A, --without-ac-adapter     suppress ac-adapter information
-  -V, --everything             show every device, overrides above options
-  -s, --show-empty             show non-operational devices
-  -S, --hide-empty             hide non-operational devices
-  -c, --celcius                use celcius as the temperature unit
-  -f, --fahrenheit             use fahrenheit as the temperature unit
-  -k, --kelvin                 use kelvin as the temperature unit
-  -d, --directory <dir>        path to ACPI info (/proc/acpi)
-  -h, --help                   display this help and exit
-  -v, --version                output version information and exit
-
-By default, acpi displays information on installed system batteries.=20
-Non-operational devices, for example empty battery slots are hidden.
-The default unit of temperature is degrees celcius.
-
-Report bugs to Grahame Bowland <grahame@azale.net>.
-""");
+    printf("Usage: acpi [OPTION]...\nShows information from the /proc file=
system, such as battery status or\nthermal information.\n  -b, --battery   =
             battery information\n  -B, --without-battery        suppress b=
attery information\n  -t, --thermal                thermal information\n  -=
T, --without-thermal        suppress thermal information\n  -a, --ac-adapte=
r             ac adapter information\n  -A, --without-ac-adapter     suppre=
ss ac-adapter information\n  -V, --everything             show every device=
, overrides above options\n  -s, --show-empty             show non-operatio=
nal devices\n  -S, --hide-empty             hide non-operational devices\n =
 -c, --celcius                use celcius as the temperature unit\n  -f, --=
fahrenheit             use fahrenheit as the temperature unit\n  -k, --kelv=
in                 use kelvin as the temperature unit\n  -d, --directory <d=
ir>        path to ACPI info (/proc/acpi)\n  -h, --help                   d=
isplay this help and exit\n  -v, --version                output version in=
formation and exit\nBy default, acpi displays information on installed syst=
em batteries.\nNon-operational devices, for example empty battery slots are=
 hidden.\nThe default unit of temperature is degrees celcius.\nReport bugs =
to Grahame Bowland <grahame@azale.net>.\n");
     return 1;
 }
=20

--=-3v9xLhqvns92R67DPbt0--