lkml.org 
[lkml]   [2005]   [Mar]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH 3/29] FAT: fat_readdirx() with dotOK=yes fix
From
Date

In the case of dotsOK, re-initialization of "ptname" pointer is needed,
otherwise, "ptname" is pointing the previous start position.

This fixes it.

Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
---

fs/fat/dir.c | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)

diff -puN fs/fat/dir.c~fat_readdirx-fix fs/fat/dir.c
--- linux-2.6.11/fs/fat/dir.c~fat_readdirx-fix 2005-03-06 02:36:05.000000000 +0900
+++ linux-2.6.11-hirofumi/fs/fat/dir.c 2005-03-06 02:36:05.000000000 +0900
@@ -442,9 +442,13 @@ ParseLong:
long_slots = 0;
}

- if ((de->attr & ATTR_HIDDEN) && MSDOS_SB(sb)->options.dotsOK) {
- *ptname++ = '.';
- dotoffset = 1;
+ if (MSDOS_SB(sb)->options.dotsOK) {
+ ptname = bufname;
+ dotoffset = 0;
+ if (de->attr & ATTR_HIDDEN) {
+ *ptname++ = '.';
+ dotoffset = 1;
+ }
}

memcpy(work, de->name, sizeof(de->name));
_
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-03-22 14:10    [W:0.114 / U:0.444 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site