fix printf format args

pull/1/head
Marty Connor 2006-06-29 19:04:25 +00:00
parent e8cc1c4333
commit eb091f03e3
2 changed files with 6 additions and 5 deletions

View File

@ -25,10 +25,10 @@ void hex_dump ( const char *data, const unsigned int len ) {
more(); more();
} }
if ( ( index % 16 ) == 0 ) { if ( ( index % 16 ) == 0 ) {
printf ( "%X [%X] : %hX :", data + index, printf ( "%p [%lX] : %X :", data + index,
virt_to_phys ( data + index ), index ); virt_to_phys ( data + index ), index );
} }
printf ( " %hhX", data[index] ); printf ( " %02X", data[index] );
} }
printf ( "\n" ); printf ( "\n" );
} }
@ -64,19 +64,19 @@ int check_region ( void *region, size_t len ) {
/* Start of corruption */ /* Start of corruption */
if ( corrupted == 0 ) { if ( corrupted == 0 ) {
corrupted = 1; corrupted = 1;
printf ( "Region %#x-%#x (physical %#x-%#x) " printf ( "Region %p-%p (physical %#lx-%#lx) "
"corrupted\n", "corrupted\n",
region, region + len, region, region + len,
virt_to_phys ( region ), virt_to_phys ( region ),
virt_to_phys ( region + len ) ); virt_to_phys ( region + len ) );
} }
in_corruption = 1; in_corruption = 1;
printf ( "--- offset %#x ", offset ); printf ( "--- offset %#lx ", offset );
} else if ( ( in_corruption != 0 ) && } else if ( ( in_corruption != 0 ) &&
( test == GUARD_SYMBOL ) ) { ( test == GUARD_SYMBOL ) ) {
/* End of corruption */ /* End of corruption */
in_corruption = 0; in_corruption = 0;
printf ( "to offset %#x", offset ); printf ( "to offset %#lx", offset );
} }
} }

View File

@ -2,6 +2,7 @@
#include "buffer.h" #include "buffer.h"
#include "load_buffer.h" #include "load_buffer.h"
#include "image.h" #include "image.h"
#include <console.h>
static struct image images[0] __image_start; static struct image images[0] __image_start;
static struct image images_end[0] __image_end; static struct image images_end[0] __image_end;