j
: Next unread message k
: Previous unread message j a
: Jump to all threads
j l
: Jump to MailingList overview
Author: blueswirl Date: 2008-11-29 17:24:51 +0100 (Sat, 29 Nov 2008) New Revision: 272
Modified: openbios-devel/arch/sparc64/aoutload.c openbios-devel/arch/sparc64/elfload.c openbios-devel/arch/sparc64/linux_load.c openbios-devel/arch/sparc64/openbios.c openbios-devel/drivers/floppy.c openbios-devel/kernel/cross.h openbios-devel/modules/client.c Log: Fix most print format warnings
Modified: openbios-devel/arch/sparc64/aoutload.c =================================================================== --- openbios-devel/arch/sparc64/aoutload.c 2008-11-29 13:20:42 UTC (rev 271) +++ openbios-devel/arch/sparc64/aoutload.c 2008-11-29 16:24:51 UTC (rev 272) @@ -106,11 +106,11 @@
if (N_MAGIC(ehdr) == NMAGIC) { if ((unsigned long)lfile_read((void *)start, ehdr.a_text) != ehdr.a_text) { - printf("Can't read program text segment (size 0x%lx)\n", ehdr.a_text); + printf("Can't read program text segment (size 0x%x)\n", ehdr.a_text); goto out; } if ((unsigned long)lfile_read((void *)(start + N_DATADDR(ehdr)), ehdr.a_data) != ehdr.a_data) { - printf("Can't read program data segment (size 0x%lx)\n", ehdr.a_data); + printf("Can't read program data segment (size 0x%x)\n", ehdr.a_data); goto out; } } else {
Modified: openbios-devel/arch/sparc64/elfload.c =================================================================== --- openbios-devel/arch/sparc64/elfload.c 2008-11-29 13:20:42 UTC (rev 271) +++ openbios-devel/arch/sparc64/elfload.c 2008-11-29 16:24:51 UTC (rev 272) @@ -145,7 +145,7 @@ for (i = 0; i < phnum; i++) { if (phdr[i].p_type != PT_LOAD) continue; - debug("segment %d addr:%#lx file:%#lx mem:%#lx ", + debug("segment %d addr:%#llx file:%#llx mem:%#llx ", i, addr_fixup(phdr[i].p_paddr), phdr[i].p_filesz, phdr[i].p_memsz); file_seek(offset + phdr[i].p_offset); debug("loading... "); @@ -377,7 +377,7 @@
//debug("current time: %lu\n", currticks());
- debug("entry point is %#lx\n", addr_fixup(ehdr.e_entry)); + debug("entry point is %#llx\n", addr_fixup(ehdr.e_entry)); printf("Jumping to entry point...\n");
#if 0
Modified: openbios-devel/arch/sparc64/linux_load.c =================================================================== --- openbios-devel/arch/sparc64/linux_load.c 2008-11-29 13:20:42 UTC (rev 271) +++ openbios-devel/arch/sparc64/linux_load.c 2008-11-29 16:24:51 UTC (rev 272) @@ -574,7 +574,7 @@ ctx = switch_to(ctx);
/* It's impossible but... */ - printf("Returned with o0=%#lx\n", ctx->regs[REG_O0]); + printf("Returned with o0=%#llx\n", ctx->regs[REG_O0]);
return ctx->regs[REG_O0]; }
Modified: openbios-devel/arch/sparc64/openbios.c =================================================================== --- openbios-devel/arch/sparc64/openbios.c 2008-11-29 13:20:42 UTC (rev 271) +++ openbios-devel/arch/sparc64/openbios.c 2008-11-29 16:24:51 UTC (rev 272) @@ -598,7 +598,7 @@ cmdline_size = size; boot_device = nv_info.boot_devices[0];
- printk("kernel addr %lx size %lx\n", kernel_image, kernel_size); + printk("kernel addr %llx size %llx\n", kernel_image, kernel_size); if (size) printk("kernel cmdline %s\n", obio_cmdline);
Modified: openbios-devel/drivers/floppy.c =================================================================== --- openbios-devel/drivers/floppy.c 2008-11-29 13:20:42 UTC (rev 271) +++ openbios-devel/drivers/floppy.c 2008-11-29 16:24:51 UTC (rev 272) @@ -938,7 +938,7 @@ if ((bytes = result(reply_buffer, MAX_REPLIES)) <= 0x00) return FDC_NONE; /* No FDC present ??? */ if ((bytes==1) && (reply_buffer[0] == 0x80)){ - printk_info("FDC %d is an 8272A\n"); + printk_info("FDC is an 8272A\n"); return FDC_8272A; /* 8272a/765 don't know DUMPREGS */ } if (bytes != 10) {
Modified: openbios-devel/kernel/cross.h =================================================================== --- openbios-devel/kernel/cross.h 2008-11-29 13:20:42 UTC (rev 271) +++ openbios-devel/kernel/cross.h 2008-11-29 16:24:51 UTC (rev 272) @@ -43,8 +43,8 @@ #define target_ulong(value) (target_long(value))
#if BITS==32 -#define target_ucell(value) (target_long(value)) -#define target_cell(value) (target_long(value)) +#define target_ucell(value) ((ucell)target_long(value)) +#define target_cell(value) ((cell)target_long(value)) #elif BITS==64 #ifdef NATIVE_BITWIDTH_LARGER_THAN_HOST_BITWIDTH #define target_ucell(value) ( ((ucell)target_long((value)&0xffffffff))<<32 ) @@ -108,9 +108,14 @@ #ifdef NATIVE_BITWIDTH_EQUALS_HOST_BITWIDTH #define pointer2cell(x) ((ucell)(x)) #define cell2pointer(x) ((u8 *)(x)) +#if BITS==32 #define FMT_CELL_x "x" #define FMT_CELL_d "d" +#else +#define FMT_CELL_x "lx" +#define FMT_CELL_d "ld" #endif +#endif
#ifdef NATIVE_BITWIDTH_SMALLER_THAN_HOST_BITWIDTH extern unsigned long base_address;
Modified: openbios-devel/modules/client.c =================================================================== --- openbios-devel/modules/client.c 2008-11-29 13:20:42 UTC (rev 271) +++ openbios-devel/modules/client.c 2008-11-29 16:24:51 UTC (rev 272) @@ -97,7 +97,7 @@ if( (val=POP()) ) { dstackcnt = dstacksave; if( val == -1 ) - printk("Unimplemented service %s ([%d] -- [%d])\n", + printk("Unimplemented service %s ([%ld] -- [%ld])\n", pb->service, pb->nargs, pb->nret ); return -1; }