WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] Merged.

# HG changeset patch
# User emellor@ewan
# Node ID 97648825856b5685fe3493a7a41a3f61bf893fba
# Parent  b938c4965a8f1cab34f27d66187a896743057c5d
# Parent  26599c5d298d128d0317a66c93332e241058ba68
Merged.

diff -r b938c4965a8f -r 97648825856b tools/firmware/acpi/acpi_gen.c
--- a/tools/firmware/acpi/acpi_gen.c    Wed Oct 12 12:13:32 2005
+++ b/tools/firmware/acpi/acpi_gen.c    Wed Oct 12 12:20:10 2005
@@ -16,44 +16,38 @@
  *
  */
 #include "acpi2_0.h"
-#include "stdio.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
 
-/*
- * Generate acpi table
- * write acpi table to binary: acpitable.bin
- *
- */
- 
-#define USAGE "Usage: acpi_gen filename \n" \
-                         "       generage acpitable and write to the binary 
\n" \
-                         "       filename - the binary name\n"
+#define USAGE  "Usage: acpi_gen filename \n"                           \
+               "       generage acpitable and write to the binary \n"  \
+               "       filename - the binary name\n"
 
+int main(int argc, char **argv)
+{
+       char *filename;
+       char  buf[ACPI_TABLE_SIZE] = { 0 };
+       FILE *f;
 
-int main(int argc, char** argv){
-               char* filename;
-               char  buf[ACPI_TABLE_SIZE];
-               FILE* f=NULL;
-               int i;
+       if (argc < 2) {
+               fprintf(stderr,"%s",USAGE);
+               exit(1);
+       }
 
-               for (i=0; i<ACPI_TABLE_SIZE; i++){
-                               buf[i]=0;
-               }
+       filename = argv[1];
+               
+       if ((f = fopen(filename, "w+")) == NULL) {
+               fprintf(stderr,"Can not open %s", filename);
+               exit(1);
+       }
 
-               if (argc<2){
-                               fprintf(stderr,"%s",USAGE);
-                               exit(1);
-               }
+       AcpiBuildTable((uint8_t *)buf);
 
-               filename = argv[1];
-               
-               if(!(f=fopen(filename, "w+"))){
-                               fprintf(stderr,"Can not open %s",filename);
-                               exit(1);
-               }               
-        AcpiBuildTable(buf);
-               if (fwrite(buf, ACPI_TABLE_SIZE, 1, f)<1){
-                               fprintf(stderr,"Can not write to 
%s\n",filename);
-                               exit(1);
-               }
-               return 0;               
+       if (fwrite(buf, ACPI_TABLE_SIZE, 1, f) < 1) {
+               fprintf(stderr,"Can not write to %s\n", filename);
+               exit(1);
+       }
+
+       return 0;
 }
diff -r b938c4965a8f -r 97648825856b tools/firmware/vmxassist/Makefile
--- a/tools/firmware/vmxassist/Makefile Wed Oct 12 12:13:32 2005
+++ b/tools/firmware/vmxassist/Makefile Wed Oct 12 12:20:10 2005
@@ -24,14 +24,14 @@
 # The emulator code lives in ROM space
 TEXTADDR=0x000D0000
 
-DEFINES=-DDEBUG -DTEXTADDR=${TEXTADDR}
+DEFINES=-DDEBUG -DTEXTADDR=$(TEXTADDR)
 XENINC=-I$(XEN_ROOT)/tools/libxc
 
 LD       = ld
 CC       = gcc
 CPP      = cpp -P
 OBJCOPY  = objcopy -p -O binary -R .note -R .comment -R .bss -S --gap-fill=0
-CFLAGS   = ${DEFINES} -I. $(XENINC) -Wall -fno-builtin -O2 -msoft-float
+CFLAGS   = $(DEFINES) -I. $(XENINC) -Wall -fno-builtin -O2 -msoft-float
 CFLAGS  += -m32 -march=i686
 LDFLAGS  = -m elf_i386
 
@@ -40,33 +40,33 @@
 all: vmxloader
 
 vmxloader: roms.h vmxloader.c acpi.h acpi_madt.c
-       ${CC} ${CFLAGS} ${DEFINES} -c vmxloader.c -c acpi_madt.c
+       $(CC) $(CFLAGS) $(DEFINES) -c vmxloader.c -c acpi_madt.c
        $(CC) -o vmxloader.tmp -m32 -nostdlib -Wl,-N -Wl,-Ttext -Wl,0x100000 
vmxloader.o acpi_madt.o
        objcopy vmxloader.tmp vmxloader
        rm -f vmxloader.tmp
 
-vmxassist.bin: vmxassist.ld ${OBJECTS}
-       ${CPP} ${DEFINES} vmxassist.ld > vmxassist.tmp
-       ${LD} -o vmxassist ${LDFLAGS} -nostdlib --fatal-warnings -N -T 
vmxassist.tmp ${OBJECTS}
+vmxassist.bin: vmxassist.ld $(OBJECTS)
+       $(CPP) $(DEFINES) vmxassist.ld > vmxassist.tmp
+       $(LD) -o vmxassist $(LDFLAGS) -nostdlib --fatal-warnings -N -T 
vmxassist.tmp $(OBJECTS)
        nm -n vmxassist > vmxassist.sym
-       ${OBJCOPY} vmxassist vmxassist.tmp
+       $(OBJCOPY) vmxassist vmxassist.tmp
        dd if=vmxassist.tmp of=vmxassist.bin ibs=512 conv=sync
        rm -f vmxassist.tmp
 
 head.o: machine.h head.S
-       ${CC} ${CFLAGS} -D__ASSEMBLY__ ${DEFINES} -c head.S
+       $(CC) $(CFLAGS) -D__ASSEMBLY__ $(DEFINES) -c head.S
 
 trap.o: machine.h offsets.h trap.S
-       ${CC} ${CFLAGS} -D__ASSEMBLY__ ${DEFINES} -c trap.S
+       $(CC) $(CFLAGS) -D__ASSEMBLY__ $(DEFINES) -c trap.S
 
 vm86.o: machine.h vm86.c
-       ${CC} ${CFLAGS} -c vm86.c
+       $(CC) $(CFLAGS) -c vm86.c
 
 setup.o: machine.h setup.c
-       ${CC} ${CFLAGS} -c setup.c
+       $(CC) $(CFLAGS) -c setup.c
 
 util.o: machine.h util.c
-       ${CC} ${CFLAGS} -c util.c
+       $(CC) $(CFLAGS) -c util.c
 
 roms.h:        ../rombios/BIOS-bochs-latest ../vgabios/VGABIOS-lgpl-latest.bin 
../vgabios/VGABIOS-lgpl-latest.cirrus.bin vmxassist.bin
        ./mkhex rombios ../rombios/BIOS-bochs-latest > roms.h
@@ -81,10 +81,10 @@
        ./gen > offsets.h
 
 gen:   gen.c
-       ${CC} ${CFLAGS} -o gen gen.c
+       $(HOSTCC) $(HOSTCFLAGS) -I. $(XENINC) -o gen gen.c
 
 clean:
        rm -f vmxassist vmxassist.tmp vmxassist.bin vmxassist.run vmxassist.sym 
head.s roms.h acpi.h
-       rm -f vmxloader vmxloader.tmp vmxloader.o ${OBJECTS}
+       rm -f vmxloader vmxloader.tmp vmxloader.o $(OBJECTS)
        rm -f gen gen.o offsets.h
 

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

<Prev in Thread] Current Thread [Next in Thread>