diff options
author | germeier <germeier> | 2003-07-15 08:26:37 +0000 |
---|---|---|
committer | germeier <germeier> | 2003-07-15 08:26:37 +0000 |
commit | a51e2522aeab2605e0db7bead113e557d5dccd86 (patch) | |
tree | c139028df448ae69e1dd2da054bf28e25af70835 /libmpio | |
parent | 170e9880d8b7321eab663ce56e7874ed7f835f56 (diff) | |
download | mpiosh-a51e2522aeab2605e0db7bead113e557d5dccd86.tar.gz mpiosh-a51e2522aeab2605e0db7bead113e557d5dccd86.tar.bz2 mpiosh-a51e2522aeab2605e0db7bead113e557d5dccd86.zip |
further fixes
Diffstat (limited to 'libmpio')
-rw-r--r-- | libmpio/src/directory.c | 7 | ||||
-rw-r--r-- | libmpio/src/fat.c | 6 |
2 files changed, 9 insertions, 4 deletions
diff --git a/libmpio/src/directory.c b/libmpio/src/directory.c index 7240c14..b4a1e44 100644 --- a/libmpio/src/directory.c +++ b/libmpio/src/directory.c @@ -1,5 +1,5 @@ /* - * $Id: directory.c,v 1.10 2003/07/15 07:34:53 germeier Exp $ + * $Id: directory.c,v 1.11 2003/07/15 08:26:37 germeier Exp $ * * libmpio - a library for accessing Digit@lways MPIO players * Copyright (C) 2002, 2003 Markus Germeier @@ -288,6 +288,11 @@ mpio_directory_make(mpio_t *m, mpio_mem_t mem, BYTE *dir) parent=0; } else { current = mpio_dentry_get_startcluster(m, mem, sm->cdir->dentry); + if (!current) { + debugn(2, "error creating directory"); + return MPIO_ERR_FAT_ERROR; + } + if (mem==MPIO_INTERNAL_MEM) { parent = current->i_index; diff --git a/libmpio/src/fat.c b/libmpio/src/fat.c index 0bd05d9..36ac6ac 100644 --- a/libmpio/src/fat.c +++ b/libmpio/src/fat.c @@ -1,5 +1,5 @@ /* - * $Id: fat.c,v 1.3 2003/04/27 12:08:21 germeier Exp $ + * $Id: fat.c,v 1.4 2003/07/15 08:26:37 germeier Exp $ * * libmpio - a library for accessing Digit@lways MPIO players * Copyright (C) 2002, 2003 Markus Germeier @@ -630,7 +630,7 @@ mpio_fat_internal_find_fileindex(mpio_t *m) mpio_fatentry_t *f; mpio_smartmedia_t *sm = &m->internal; BYTE index[256]; - BYTE found; /* hmm, ... */ + WORD found; /* hmm, ... */ memset(index, 1, 256); @@ -646,7 +646,7 @@ mpio_fat_internal_find_fileindex(mpio_t *m) while((found<256) && (!index[found])) found++; - if (found==256) + if (found>=256) { debug("Oops, did not find a new fileindex!\n" "This should never happen, aborting now!, Sorry!\n"); |