diff options
author | tjr <tjr@FreeBSD.org> | 2004-07-27 01:33:27 +0000 |
---|---|---|
committer | tjr <tjr@FreeBSD.org> | 2004-07-27 01:33:27 +0000 |
commit | b9200ab932d79b39fe2280bc9e7bba7573808f00 (patch) | |
tree | f8a8896178f34bd7925b8aaf32f24efb173e0615 | |
parent | 90290e8fb7f8cb40d89b8c69b4744a8af26e087d (diff) | |
download | FreeBSD-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.
-rw-r--r-- | sys/i386/acpica/genwakecode.sh | 12 |
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 |