FAT: improved last fix.
* Don't use filename at all, since it's not clear if puni has already been set at this point. * Also, fixed warning *vnid is ino_t, not a pointer.
This commit is contained in:
@@ -81,18 +81,15 @@ _next_dirent_(struct diri *iter, struct _dirent_info_ *oinfo, char *filename,
|
|||||||
DPRINTF(2, ("_next_dirent_: %lx/%lx/%lx\n", iter->csi.cluster,
|
DPRINTF(2, ("_next_dirent_: %lx/%lx/%lx\n", iter->csi.cluster,
|
||||||
iter->csi.sector, iter->current_index));
|
iter->csi.sector, iter->current_index));
|
||||||
if (buffer[0] == 0) { // quit if at end of table
|
if (buffer[0] == 0) { // quit if at end of table
|
||||||
if (start_index != 0xffff) {
|
if (start_index != 0xffff)
|
||||||
*puni = 0;
|
dprintf("lfn entry (%" B_PRIu32 ") with no alias\n", lfn_count);
|
||||||
dprintf("lfn entry (%s) with no alias\n", uni);
|
|
||||||
}
|
|
||||||
return ENOENT;
|
return ENOENT;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (buffer[0] == 0xe5) { // skip erased entries
|
if (buffer[0] == 0xe5) { // skip erased entries
|
||||||
if (start_index != 0xffff) {
|
if (start_index != 0xffff) {
|
||||||
*puni = 0;
|
dprintf("lfn entry (%" B_PRIu32 ") with intervening erased "
|
||||||
dprintf("lfn entry (%s) with intervening erased entries\n",
|
"entries\n", lfn_count);
|
||||||
uni);
|
|
||||||
start_index = 0xffff;
|
start_index = 0xffff;
|
||||||
}
|
}
|
||||||
DPRINTF(2, ("entry erased, skipping...\n"));
|
DPRINTF(2, ("entry erased, skipping...\n"));
|
||||||
@@ -265,7 +262,7 @@ get_next_dirent(nspace *vol, vnode *dir, struct diri *iter, ino_t *vnid,
|
|||||||
}
|
}
|
||||||
|
|
||||||
DPRINTF(2, ("get_next_dirent: found %s (vnid %Lx)\n", filename,
|
DPRINTF(2, ("get_next_dirent: found %s (vnid %Lx)\n", filename,
|
||||||
vnid != NULL ? *vnid : NULL));
|
vnid != NULL ? *vnid : (ino_t)0));
|
||||||
|
|
||||||
return B_NO_ERROR;
|
return B_NO_ERROR;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user