summaryrefslogtreecommitdiff
path: root/firmware/test/fat/ata-sim.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/test/fat/ata-sim.c')
-rw-r--r--firmware/test/fat/ata-sim.c12
1 files changed, 10 insertions, 2 deletions
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;
10 10
11int ata_read_sectors(unsigned long start, unsigned char count, void* buf) 11int ata_read_sectors(unsigned long start, unsigned char count, void* buf)
12{ 12{
13 DEBUGF("[Reading block 0x%lx, %d]\n", start, count); 13 if ( count > 1 )
14 DEBUGF("[Reading %d blocks: 0x%lx to 0x%lx]\n",
15 count, start, start+count-1);
16 else
17 DEBUGF("[Reading block 0x%lx, %d]\n", start, count);
14 18
15 if(fseek(file,start*BLOCK_SIZE,SEEK_SET)) { 19 if(fseek(file,start*BLOCK_SIZE,SEEK_SET)) {
16 perror("fseek"); 20 perror("fseek");
@@ -26,7 +30,11 @@ int ata_read_sectors(unsigned long start, unsigned char count, void* buf)
26 30
27int ata_write_sectors(unsigned long start, unsigned char count, void* buf) 31int ata_write_sectors(unsigned long start, unsigned char count, void* buf)
28{ 32{
29 DEBUGF("[Writing block 0x%lx, %d]\n", start, count); 33 if ( count > 1 )
34 DEBUGF("[Writing %d blocks: 0x%lx to 0x%lx]\n",
35 count, start, start+count-1);
36 else
37 DEBUGF("[Writing block 0x%lx]\n", start);
30 38
31 if (start == 0) 39 if (start == 0)
32 panicf("Writing on sector 0!\n"); 40 panicf("Writing on sector 0!\n");