projects
/
debian
/
elilo
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Imported Upstream version 3.10
[debian/elilo]
/
ia32
/
gzip.c
diff --git
a/ia32/gzip.c
b/ia32/gzip.c
index fff5f6d52ba1eb3f5804aa69e376c89b8ecd4436..cc801ad770a53a87ba06926d5026633e120d0c90 100644
(file)
--- a/
ia32/gzip.c
+++ b/
ia32/gzip.c
@@
-153,7
+153,7
@@
gzip_free(void *where)
int
fill_inbuf(void)
{
int
fill_inbuf(void)
{
- INTN expected, nread;
+
U
INTN expected, nread;
EFI_STATUS status;
expected = nread = INBUFSIZE;
EFI_STATUS status;
expected = nread = INBUFSIZE;
@@
-277,7
+277,7
@@
analyze_chunks(void)
* the relevant header information.
*/
int
* the relevant header information.
*/
int
-first_block (const char *buf, long blocksize)
+first_block (const
unsigned
char *buf, long blocksize)
{
Elf32_Ehdr *elf;
Elf32_Phdr *phdrs;
{
Elf32_Ehdr *elf;
Elf32_Phdr *phdrs;
@@
-297,13
+297,13
@@
first_block (const char *buf, long blocksize)
phnum = elf->e_phnum;
VERB_PRT(3, {
phnum = elf->e_phnum;
VERB_PRT(3, {
- Print(L"Entry point
0x%lx
\n", elf->e_entry);
+ Print(L"Entry point
"PTR_FMT"
\n", elf->e_entry);
Print(L"%d program headers\n", phnum);
Print(L"%d segment headers\n", elf->e_shnum);
});
if (offs + phnum * sizeof(*phdrs) > (unsigned) blocksize) {
Print(L"%d program headers\n", phnum);
Print(L"%d segment headers\n", elf->e_shnum);
});
if (offs + phnum * sizeof(*phdrs) > (unsigned) blocksize) {
- ERR_PRT((L"%s : ELF program headers not in first block (%
l
d)\n", LD_NAME, offs));
+ ERR_PRT((L"%s : ELF program headers not in first block (%d)\n", LD_NAME, offs));
return -1;
}
return -1;
}
@@
-345,15
+345,15
@@
first_block (const char *buf, long blocksize)
if (phdrs[i].p_type != PT_LOAD) {
CHUNK_NO_LOAD(i); /* mark no load chunk */
if (phdrs[i].p_type != PT_LOAD) {
CHUNK_NO_LOAD(i); /* mark no load chunk */
- DBG_PRT((L"%s : skipping segment %
l
d\n", LD_NAME, i));
+ DBG_PRT((L"%s : skipping segment %d\n", LD_NAME, i));
continue;
}
CHUNK_CAN_LOAD(i); /* mark no load chunk */
VERB_PRT(3,
continue;
}
CHUNK_CAN_LOAD(i); /* mark no load chunk */
VERB_PRT(3,
- Print(L"\n%s : segment %
ld vaddr [0x%lx-0x%lx] offset %ld filesz %l
d "
- "memsz=%
ld bss_sz=%l
d\n",
+ Print(L"\n%s : segment %
d vaddr ["PTR_FMT"-"PTR_FMT"] offset %d filesz %
d "
+ "memsz=%
d bss_sz=%
d\n",
LD_NAME, 1+i, chunks[i].addr, chunks[i].addr+phdrs[i].p_filesz,
chunks[i].offset, chunks[i].size, memsz, chunks[i].bss_sz));
LD_NAME, 1+i, chunks[i].addr, chunks[i].addr+phdrs[i].p_filesz,
chunks[i].offset, chunks[i].size, memsz, chunks[i].bss_sz));
@@
-364,12
+364,12
@@
first_block (const char *buf, long blocksize)
}
if (low_addr & (EFI_PAGE_SIZE - 1)) {
}
if (low_addr & (EFI_PAGE_SIZE - 1)) {
- ERR_PRT((L"%s : low_addr not page aligned
0x%lx
\n", LD_NAME, low_addr));
+ ERR_PRT((L"%s : low_addr not page aligned
"PTR_FMT"
\n", LD_NAME, low_addr));
goto error;
}
analyze_chunks();
goto error;
}
analyze_chunks();
- DBG_PRT((L"%s : %d program headers entry=
0x%lx\nlowest_addr=0x%lx highest_addr=0x%lx
\n",
+ DBG_PRT((L"%s : %d program headers entry=
" PTR_FMT "\nlowest_addr="PTR_FMT" highest_addr="PTR_FMT"
\n",
LD_NAME,
phnum, kernel_entry, low_addr, max_addr));
LD_NAME,
phnum, kernel_entry, low_addr, max_addr));
@@
-384,9
+384,9
@@
first_block (const char *buf, long blocksize)
/* allocate memory for the kernel */
if (alloc_kmem((void *)low_addr, pages) == -1) {
/* allocate memory for the kernel */
if (alloc_kmem((void *)low_addr, pages) == -1) {
- ERR_PRT((L"%s : AllocatePages(%d,
0x%lx
) for kernel failed\n",
+ ERR_PRT((L"%s : AllocatePages(%d,
"PTR_FMT"
) for kernel failed\n",
LD_NAME, pages, low_addr));
LD_NAME, pages, low_addr));
- ERR_PRT((L"%s : Could not load kernel at
0x%lx
\n", LD_NAME, low_addr));
+ ERR_PRT((L"%s : Could not load kernel at
"PTR_FMT"
\n", LD_NAME, low_addr));
ERR_PRT((L"%s : Bailing\n", LD_NAME));
goto error;
}
ERR_PRT((L"%s : Bailing\n", LD_NAME));
goto error;
}
@@
-430,12
+430,12
@@
flush_window(void)
static const CHAR8 helicopter[4] = { '|' , '/' , '-' , '\\' };
static UINTN heli_count;
struct segment *cp;
static const CHAR8 helicopter[4] = { '|' , '/' , '-' , '\\' };
static UINTN heli_count;
struct segment *cp;
-
char
*src, *dst;
+
unsigned char
*src, *dst;
long cnt;
if (!outcnt) return;
long cnt;
if (!outcnt) return;
- DBG_PRT((L"%s : flush_window outnct=%d file_offset=%
l
d\n", LD_NAME, outcnt, file_offset));
+ DBG_PRT((L"%s : flush_window outnct=%d file_offset=%d\n", LD_NAME, outcnt, file_offset));
Print(L"%c\b",helicopter[heli_count++%4]);
Print(L"%c\b",helicopter[heli_count++%4]);
@@
-468,7
+468,7
@@
tail:
file_offset += skip;
outcnt -= skip;
}
file_offset += skip;
outcnt -= skip;
}
- dst = (char *)cp->addr + (file_offset - cp->offset);
+ dst = (
unsigned
char *)cp->addr + (file_offset - cp->offset);
cnt = cp->offset + cp->size - file_offset;
if (cnt > outcnt)
cnt = outcnt;
cnt = cp->offset + cp->size - file_offset;
if (cnt > outcnt)
cnt = outcnt;
@@
-482,7
+482,7
@@
tail:
/* See if we are at the end of this chunk */
if (file_offset == cp->offset + cp->size) {
if (cp->bss_sz) {
/* See if we are at the end of this chunk */
if (file_offset == cp->offset + cp->size) {
if (cp->bss_sz) {
- dst = (char *)cp->addr + cp->size;
+ dst = (
unsigned
char *)cp->addr + cp->size;
Memset(dst, 0, cp->bss_sz);
}
nextchunk();
Memset(dst, 0, cp->bss_sz);
}
nextchunk();