Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/i386/acpi simplify: use hexdump to produce the outp...



details:   https://anonhg.NetBSD.org/src/rev/7e6ea52b5389
branches:  trunk
changeset: 532992:7e6ea52b5389
user:      christos <christos%NetBSD.org@localhost>
date:      Tue Jun 18 17:21:33 2002 +0000

description:
simplify: use hexdump to produce the output in the desired form instead
of massaging it with sed.

diffstat:

 sys/arch/i386/acpi/genwakecode.sh |  14 +++-----------
 1 files changed, 3 insertions(+), 11 deletions(-)

diffs (29 lines):

diff -r fd80f42c40bb -r 7e6ea52b5389 sys/arch/i386/acpi/genwakecode.sh
--- a/sys/arch/i386/acpi/genwakecode.sh Tue Jun 18 17:13:29 2002 +0000
+++ b/sys/arch/i386/acpi/genwakecode.sh Tue Jun 18 17:21:33 2002 +0000
@@ -1,5 +1,5 @@
 #!/bin/sh
-# $NetBSD: genwakecode.sh,v 1.2 2002/06/18 07:37:37 tshiozak Exp $
+# $NetBSD: genwakecode.sh,v 1.3 2002/06/18 17:21:33 christos Exp $
 # FreeBSD: src/sys/i386/acpica/genwakecode.sh,v 1.1 2002/05/01 21:52:34 peter Exp $
 echo '/* THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. */'
 head -1 acpi_wakecode.S | sed 's@^.*\$\(NetBSD:.*\)\$.*$@/* from: \1 */@'
@@ -24,16 +24,8 @@
 done || exit 1
 
 echo 
-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 'static const unsigned char wakecode[] = {';
+hexdump -v -e '"\t" 8/1 "0x%02x, " "\n"' < acpi_wakecode.bin
 echo '};'
 
 exit 0



Home | Main Index | Thread Index | Old Index