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

[Xen-changelog] [xen-unstable] hvmloader: Replace unportable usage of GNU head with portable awk.



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1266864170 0
# Node ID 2e7dc3421a523dc64981861ffcd77a968931871f
# Parent  94e009ef5a58c02d4fe78fcc4c85627b469ee937
hvmloader: Replace unportable usage of GNU head with portable awk.

Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
---
 tools/firmware/hvmloader/acpi/Makefile |    3 ++-
 1 files changed, 2 insertions(+), 1 deletion(-)

diff -r 94e009ef5a58 -r 2e7dc3421a52 tools/firmware/hvmloader/acpi/Makefile
--- a/tools/firmware/hvmloader/acpi/Makefile    Mon Feb 22 10:08:10 2010 +0000
+++ b/tools/firmware/hvmloader/acpi/Makefile    Mon Feb 22 18:42:50 2010 +0000
@@ -31,9 +31,10 @@ ssdt_pm.h ssdt_tpm.h: %.h: %.asl iasl
        sed -e 's/AmlCode/$*/g' $*.hex >$@
        rm -f $*.hex $*.aml
 
+# NB. awk invocation is a portable alternative to 'head -n -1'
 dsdt_15cpu.c dsdt_anycpu.c: %.c: dsdt.asl mk_dsdt.c iasl
        $(HOSTCC) $(HOSTCFLAGS) $(CFLAGS_include) -o mk_$* mk_dsdt.c
-       head -n -1 $< >$*.asl
+       awk 'NR > 1 {print s} {s=$$0}' $< >$*.asl
        ./mk_$* >>$*.asl
        iasl -p $* -tc $*.asl
        sed -e 's/AmlCode/$*/g' $*.hex >$@

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.