summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--firmware/disk.c34
-rw-r--r--firmware/disk.h2
2 files changed, 0 insertions, 36 deletions
diff --git a/firmware/disk.c b/firmware/disk.c
index c32a39be41..acd765bab8 100644
--- a/firmware/disk.c
+++ b/firmware/disk.c
@@ -23,40 +23,6 @@
23#include "debug.h" 23#include "debug.h"
24#include "panic.h" 24#include "panic.h"
25 25
26void read_file_into_buffer( char **buf, const char *filename )
27{
28 int i;
29 FILE *fp;
30 int count = 0;
31
32 /*DEBUG( "read_file_into_buffer( %s, %s )\n", *buf, filename ); */
33
34 fp = fopen( filename, "r" );
35
36 if( fp == NULL )
37 {
38 panicf( "failed to open file: %s\n", filename );
39 }
40
41 while( ( i = getc( fp ) ) != EOF )
42 {
43 /*printf( "%d-'%c'\n", count, i ); */
44 count++;
45 *buf = (char *)realloc( *buf, count * sizeof( char ) );
46 /*printf( "%d='%s'\n", *buf, *buf ); */
47 (*(buf))[count - 1] = (char)i;
48 /*printf( "%d='%s'\n", *buf, *buf );*/
49 }
50
51 /* add null terminator */
52
53 *buf = (char *)realloc( *buf, count * sizeof( char ) );
54 (*(buf))[ count ] = '\0';
55
56 /* count -2 because of 0 start and \0 terminator
57 printf( "read %d bytes: '%s'\n", count - 2, *buf ); */
58}
59
60/* 26/*
61 * stub versions of pre-fat sector storage functions 27 * stub versions of pre-fat sector storage functions
62 */ 28 */
diff --git a/firmware/disk.h b/firmware/disk.h
index 09f8562362..0e54ee88b1 100644
--- a/firmware/disk.h
+++ b/firmware/disk.h
@@ -20,8 +20,6 @@
20#ifndef __DISK_H__ 20#ifndef __DISK_H__
21#define __DISK_H__ 21#define __DISK_H__
22 22
23void read_file_into_buffer( char **buf, const char *filename );
24
25int persist_volume_setting( void ); 23int persist_volume_setting( void );
26int persist_balance_setting( void ); 24int persist_balance_setting( void );
27int persist_bass_setting( void ); 25int persist_bass_setting( void );