efi: fix compiler warnings, remove indicator prints in readn()

This commit is contained in:
cinap_lenrek 2014-10-19 22:01:13 +02:00
parent f0ff0fb054
commit d6ea496960
3 changed files with 4 additions and 9 deletions

View file

@ -7,7 +7,7 @@ enum {
};
UINTN MK;
EFI_HANDLE *IH;
EFI_HANDLE IH;
EFI_SYSTEM_TABLE *ST;
EFI_GRAPHICS_OUTPUT_PROTOCOL *gop;

View file

@ -1,6 +1,7 @@
TARG=bootia32.efi bootx64.efi
HFILES=fns.h mem.h
IMAGEBASE=0x8000
CFLAGS=-FTVw
PEFLAGS=$CFLAGS '-DIMAGEBASE='$IMAGEBASE
all:V: $TARG

View file

@ -20,19 +20,13 @@ readn(void *f, void *data, int len)
{
uchar *p, *e;
putc(' ');
p = data;
e = p + len;
while(p < e){
if(((ulong)p & 0xF000) == 0){
putc('\b');
putc(hex[((ulong)p>>16)&0xF]);
}
if((len = read(f, p, e - p)) <= 0)
break;
p += len;
}
putc('\b');
return p - (uchar*)data;
}
@ -362,13 +356,13 @@ bootkern(void *f)
if(readn(f, t, n) != n)
goto Error;
t += n;
d = (uchar*)PGROUND((ulong)t);
d = (uchar*)PGROUND((uintptr)t);
memset(t, 0, d - t);
n = beswal(ex.data);
if(readn(f, d, n) != n)
goto Error;
d += n;
t = (uchar*)PGROUND((ulong)d);
t = (uchar*)PGROUND((uintptr)d);
t += PGROUND(beswal(ex.bss));
memset(d, 0, t - d);