aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgermeier <germeier>2003-07-15 08:26:37 +0000
committergermeier <germeier>2003-07-15 08:26:37 +0000
commita51e2522aeab2605e0db7bead113e557d5dccd86 (patch)
treec139028df448ae69e1dd2da054bf28e25af70835
parent170e9880d8b7321eab663ce56e7874ed7f835f56 (diff)
downloadmpiosh-a51e2522aeab2605e0db7bead113e557d5dccd86.tar.gz
mpiosh-a51e2522aeab2605e0db7bead113e557d5dccd86.tar.bz2
mpiosh-a51e2522aeab2605e0db7bead113e557d5dccd86.zip
further fixes
-rw-r--r--ChangeLog4
-rw-r--r--libmpio/src/directory.c7
-rw-r--r--libmpio/src/fat.c6
3 files changed, 12 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 77e4f42..cb7a07c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,7 +2,9 @@
* libmpio/src/directory.c (mpio_dentry_get_real):
follow up fix for the broken internal FAT fix
added FTYPE_BROKEN
-
+ * libmpio/src/directory.c (mpio_directory_make):
+ another follow up fix for the broken internal FAT fix
+
2003-07-14 Markus Germeier <mager@tzi.de>
* libmpio/src/directory.c (mpio_dentry_get_startcluster):
fixed a bug Yury stumbled across
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");