Browse Source

Tidied up debugging messages

tags/v0.9.3
Michael Brown 18 years ago
parent
commit
1dbafa8950
2 changed files with 5 additions and 5 deletions
  1. 4
    4
      src/core/malloc.c
  2. 1
    1
      src/net/ethernet.c

+ 4
- 4
src/core/malloc.c View File

@@ -77,7 +77,7 @@ void * alloc_memblock ( size_t size, size_t align ) {
77 77
 	 */
78 78
 	size = ( size + MIN_MEMBLOCK_SIZE - 1 ) & ~( MIN_MEMBLOCK_SIZE - 1 );
79 79
 	align_mask = ( align - 1 ) | ( MIN_MEMBLOCK_SIZE - 1 );
80
-	DBG ( "Allocating %zx (aligned %zx)\n", size, align );
80
+	DBG ( "Allocating %#zx (aligned %#zx)\n", size, align );
81 81
 
82 82
 	/* Search through blocks for the first one with enough space */
83 83
 	list_for_each_entry ( block, &free_blocks, list ) {
@@ -92,7 +92,7 @@ void * alloc_memblock ( size_t size, size_t align ) {
92 92
 			pre   = block;
93 93
 			block = ( ( ( void * ) pre   ) + pre_size );
94 94
 			post  = ( ( ( void * ) block ) + size     );
95
-			DBG ( "[%p,%p) ->  [%p,%p) + [%p,%p)\n", pre,
95
+			DBG ( "[%p,%p) -> [%p,%p) + [%p,%p)\n", pre,
96 96
 			      ( ( ( void * ) pre ) + pre->size ), pre, block,
97 97
 			      post, ( ( ( void * ) pre ) + pre->size ) );
98 98
 			/* If there is a "post" block, add it in to
@@ -124,7 +124,7 @@ void * alloc_memblock ( size_t size, size_t align ) {
124 124
 		}
125 125
 	}
126 126
 
127
-	DBG ( "Failed to allocate %zx (aligned %zx)\n", size, align );
127
+	DBG ( "Failed to allocate %#zx (aligned %#zx)\n", size, align );
128 128
 	return NULL;
129 129
 }
130 130
 
@@ -261,7 +261,7 @@ void mdumpfree ( void ) {
261 261
 
262 262
 	printf ( "Free block list:\n" );
263 263
 	list_for_each_entry ( block, &free_blocks, list ) {
264
-		printf ( "[%p,%p] (size %zx)\n", block,
264
+		printf ( "[%p,%p] (size %#zx)\n", block,
265 265
 			 ( ( ( void * ) block ) + block->size ), block->size );
266 266
 	}
267 267
 }

+ 1
- 1
src/net/ethernet.c View File

@@ -140,7 +140,7 @@ static const char * eth_ntoa ( const void *ll_addr ) {
140 140
 	static char buf[18]; /* "00:00:00:00:00:00" */
141 141
 	uint8_t *eth_addr = ll_addr;
142 142
 
143
-	sprintf ( buf, "%hhx:%hhx:%hhx:%hhx:%hhx:%hhx",
143
+	sprintf ( buf, "%02x:%02x:%02x:%02x:%02x:%02x",
144 144
 		  eth_addr[0], eth_addr[1], eth_addr[2],
145 145
 		  eth_addr[3], eth_addr[4], eth_addr[5] );
146 146
 	return buf;

Loading…
Cancel
Save