diff options
Diffstat (limited to 'firmware/common/disk.c')
-rw-r--r-- | firmware/common/disk.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/firmware/common/disk.c b/firmware/common/disk.c index 9572f115e5..b662072d5f 100644 --- a/firmware/common/disk.c +++ b/firmware/common/disk.c | |||
@@ -16,6 +16,7 @@ | |||
16 | * KIND, either express or implied. | 16 | * KIND, either express or implied. |
17 | * | 17 | * |
18 | ****************************************************************************/ | 18 | ****************************************************************************/ |
19 | #include <stdio.h> | ||
19 | #include "ata.h" | 20 | #include "ata.h" |
20 | #include "debug.h" | 21 | #include "debug.h" |
21 | #include "disk.h" | 22 | #include "disk.h" |
@@ -38,9 +39,9 @@ | |||
38 | (array[pos] | (array[pos+1] << 8 ) | \ | 39 | (array[pos] | (array[pos+1] << 8 ) | \ |
39 | (array[pos+2] << 16 ) | (array[pos+3] << 24 )) | 40 | (array[pos+2] << 16 ) | (array[pos+3] << 24 )) |
40 | 41 | ||
41 | struct partinfo part[8]; | 42 | static struct partinfo part[8]; |
42 | 43 | ||
43 | int disk_init(void) | 44 | struct partinfo* disk_init(void) |
44 | { | 45 | { |
45 | int i; | 46 | int i; |
46 | unsigned char sector[512]; | 47 | unsigned char sector[512]; |
@@ -51,7 +52,7 @@ int disk_init(void) | |||
51 | if ( (sector[510] != 0x55) || | 52 | if ( (sector[510] != 0x55) || |
52 | (sector[511] != 0xaa)) { | 53 | (sector[511] != 0xaa)) { |
53 | DEBUGF("Bad boot sector signature\n"); | 54 | DEBUGF("Bad boot sector signature\n"); |
54 | return -1; | 55 | return NULL; |
55 | } | 56 | } |
56 | 57 | ||
57 | /* parse partitions */ | 58 | /* parse partitions */ |
@@ -70,5 +71,5 @@ int disk_init(void) | |||
70 | } | 71 | } |
71 | } | 72 | } |
72 | 73 | ||
73 | return 0; | 74 | return part; |
74 | } | 75 | } |