summaryrefslogtreecommitdiffstats
path: root/sys/i386/acpica
diff options
context:
space:
mode:
authortjr <tjr@FreeBSD.org>2004-07-27 01:33:27 +0000
committertjr <tjr@FreeBSD.org>2004-07-27 01:33:27 +0000
commitb9200ab932d79b39fe2280bc9e7bba7573808f00 (patch)
treef8a8896178f34bd7925b8aaf32f24efb173e0615 /sys/i386/acpica
parent90290e8fb7f8cb40d89b8c69b4744a8af26e087d (diff)
downloadFreeBSD-src-b9200ab932d79b39fe2280bc9e7bba7573808f00.zip
FreeBSD-src-b9200ab932d79b39fe2280bc9e7bba7573808f00.tar.gz
Use file2c instead of a combination of hexdump, sed and shell script to
generate the wakecode[] array from acpi_wakecode.bin. The old method was not safe in multibyte locales.
Diffstat (limited to 'sys/i386/acpica')
-rw-r--r--sys/i386/acpica/genwakecode.sh12
1 files changed, 1 insertions, 11 deletions
diff --git a/sys/i386/acpica/genwakecode.sh b/sys/i386/acpica/genwakecode.sh
index 6db192e..e61f62c 100644
--- a/sys/i386/acpica/genwakecode.sh
+++ b/sys/i386/acpica/genwakecode.sh
@@ -1,17 +1,7 @@
#!/bin/sh
# $FreeBSD$
#
-echo 'static char wakecode[] = {';
-hexdump -Cv acpi_wakecode.bin | \
- sed -e 's/^[0-9a-f][0-9a-f]*//' -e 's/\|.*$//' | \
- while read line
- do
- for code in ${line}
- do
- echo -n "0x${code},";
- done
- done
-echo '};'
+file2c 'static char wakecode[] = {' '};' <acpi_wakecode.bin
nm -n acpi_wakecode.o | while read offset dummy what
do
OpenPOWER on IntegriCloud