From 7ee771aa57b152c4f2fe6490dbfbbc947cdf4a6c Mon Sep 17 00:00:00 2001 From: "Tim J. Robbins" Date: Tue, 27 Jul 2004 01:33:27 +0000 Subject: [PATCH] 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. --- sys/i386/acpica/genwakecode.sh | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/sys/i386/acpica/genwakecode.sh b/sys/i386/acpica/genwakecode.sh index 6db192e914a..e61f62cef4b 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[] = {' '};'