diff options
author | Marcus Brinkmann <marcus@gnu.org> | 2003-08-04 22:26:14 +0000 |
---|---|---|
committer | Marcus Brinkmann <marcus@gnu.org> | 2003-08-04 22:26:14 +0000 |
commit | c5b4d18cc640368468b5720d2520fd89ab819260 (patch) | |
tree | 86df4afa7e55d9d2445ef76a26d7ecaa737c851a /fatfs/fat.c | |
parent | e1821a4d29562acfd4b4f19700d67151fda73796 (diff) |
2003-08-05 Marcus Brinkmann <marcus@gnu.org>
* fat.c (fat_read_sblock): Catch error from store_read.
Diffstat (limited to 'fatfs/fat.c')
-rw-r--r-- | fatfs/fat.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/fatfs/fat.c b/fatfs/fat.c index 86fe908e..1d110c40 100644 --- a/fatfs/fat.c +++ b/fatfs/fat.c @@ -68,10 +68,14 @@ cluster_t next_free_cluster = 2; void fat_read_sblock (void) { + error_t err; int read; sblock = malloc (sizeof (struct boot_sector)); - store_read (store, 0, sizeof (struct boot_sector), (void **) &sblock, &read); + err = store_read (store, 0, sizeof (struct boot_sector), + (void **) &sblock, &read); + if (err) + error (1, err, "Could not read superblock"); if (read_word(sblock->id) != BOOT_SECTOR_ID) error (1, 0, "Could not find valid superblock"); |