From f9b5fdcd4d0a8095d6bc5bb91473de56ab6381c6 Mon Sep 17 00:00:00 2001 From: Björn Stenberg Date: Thu, 31 Oct 2002 20:40:15 +0000 Subject: Added lseek() to chkfile test. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2795 a1c6a512-1295-4272-9138-f99709370657 --- firmware/test/fat/ata-sim.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'firmware/test/fat/ata-sim.c') diff --git a/firmware/test/fat/ata-sim.c b/firmware/test/fat/ata-sim.c index 10bc3d9dc5..04cdadb6ce 100644 --- a/firmware/test/fat/ata-sim.c +++ b/firmware/test/fat/ata-sim.c @@ -10,7 +10,11 @@ static FILE* file; int ata_read_sectors(unsigned long start, unsigned char count, void* buf) { - DEBUGF("[Reading block 0x%lx, %d]\n", start, count); + if ( count > 1 ) + DEBUGF("[Reading %d blocks: 0x%lx to 0x%lx]\n", + count, start, start+count-1); + else + DEBUGF("[Reading block 0x%lx, %d]\n", start, count); if(fseek(file,start*BLOCK_SIZE,SEEK_SET)) { perror("fseek"); @@ -26,7 +30,11 @@ int ata_read_sectors(unsigned long start, unsigned char count, void* buf) int ata_write_sectors(unsigned long start, unsigned char count, void* buf) { - DEBUGF("[Writing block 0x%lx, %d]\n", start, count); + if ( count > 1 ) + DEBUGF("[Writing %d blocks: 0x%lx to 0x%lx]\n", + count, start, start+count-1); + else + DEBUGF("[Writing block 0x%lx]\n", start); if (start == 0) panicf("Writing on sector 0!\n"); -- cgit v1.2.3