diff --git a/c/src/lib/libbsp/i386/pc386/ChangeLog b/c/src/lib/libbsp/i386/pc386/ChangeLog index 728a11091e..a5e514d726 100644 --- a/c/src/lib/libbsp/i386/pc386/ChangeLog +++ b/c/src/lib/libbsp/i386/pc386/ChangeLog @@ -1,3 +1,7 @@ +2009-06-12 Chris Johns + + * ide/ide.c: Format the data output in DEBUG mode. + 2009-05-30 Chris Johns * ide/ide.c: Add initialisation code to reset the IDE devices and diff --git a/c/src/lib/libbsp/i386/pc386/ide/ide.c b/c/src/lib/libbsp/i386/pc386/ide/ide.c index 3e8224d25f..a43f796d11 100644 --- a/c/src/lib/libbsp/i386/pc386/ide/ide.c +++ b/c/src/lib/libbsp/i386/pc386/ide/ide.c @@ -360,7 +360,9 @@ void pc386_ide_read_block uint8_t status_val; uint16_t *lbuf = (uint16_t*) ((uint8_t*)(bufs[(*cbuf)].buffer) + (*pos)); - +#ifdef DEBUG_OUT + int i32 = 0; +#endif while (cnt < block_size) { if (!pc386_ide_status_data_ready (port, 100, &status_val)) @@ -376,9 +378,15 @@ void pc386_ide_read_block inport_word(port+IDE_REGISTER_DATA,*lbuf); #ifdef DEBUG_OUT - printk("0x%x ",*lbuf); + printk("%04x ",*lbuf); + i32++; + if (i32 >= 16) + { + printk("\n"); + i32 = 0; + } #endif - + lbuf++; cnt += sizeof(*lbuf); (*pos) += sizeof(*lbuf);