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.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/firmware/test/fat/ata-sim.c b/firmware/test/fat/ata-sim.c
index cc3eb15209..d8ed079759 100644
--- a/firmware/test/fat/ata-sim.c
+++ b/firmware/test/fat/ata-sim.c
@@ -2,12 +2,13 @@
2#include <stdlib.h> 2#include <stdlib.h>
3#include <string.h> 3#include <string.h>
4#include "debug.h" 4#include "debug.h"
5#include "panic.h"
6 5
7#define BLOCK_SIZE 512 6#define BLOCK_SIZE 512
8 7
9static FILE* file; 8static FILE* file;
10 9
10void panicf( const char *fmt, ... );
11
11int ata_read_sectors(unsigned long start, int count, void* buf) 12int ata_read_sectors(unsigned long start, int count, void* buf)
12{ 13{
13 if ( count > 1 ) 14 if ( count > 1 )
@@ -51,10 +52,9 @@ int ata_write_sectors(unsigned long start, int count, void* buf)
51 return 0; 52 return 0;
52} 53}
53 54
54int ata_init(char* filename) 55int ata_init(void)
55{ 56{
56 if (!filename) 57 char* filename = "disk.img";
57 filename = "disk.img";
58 /* check disk size */ 58 /* check disk size */
59 file=fopen(filename,"rb+"); 59 file=fopen(filename,"rb+");
60 if(!file) { 60 if(!file) {