This is the mail archive of the
ecos-bugs@sourceware.org
mailing list for the eCos project.
[Bug 1001193] New: abnormal behavior readdir on fat16
- From: bugzilla-daemon at bugs dot ecos dot sourceware dot org
- To: ecos-bugs at ecos dot sourceware dot org
- Date: Thu, 7 Apr 2011 20:33:25 +0100
- Subject: [Bug 1001193] New: abnormal behavior readdir on fat16
- Auto-submitted: auto-generated
Please do not reply to this email. Use the web interface provided at:
http://bugs.ecos.sourceware.org/show_bug.cgi?id=1001193
Summary: abnormal behavior readdir on fat16
Product: eCos
Version: unknown
Platform: All
OS/Version: Other
Status: UNCONFIRMED
Severity: minor
Priority: low
Component: FAT filesystem
AssignedTo: unassigned@bugs.ecos.sourceware.org
ReportedBy: arteminus@yandex.ru
CC: ecos-bugs@ecos.sourceware.org
Class: Advice Request
I heve code:
...
ret = mount("/dev/synthdisk0/" , "/", "fatfs");
DIR *dirp;
dirp = opendir( "/dir3/" );
while (true) {
struct dirent *entry = readdir( dirp );
if( entry == NULL ) break;
debug_printf("%s",entry->d_name);
}
...
And have directory(filesystem fat16):
/mnt/loop/dir3# ls
dir1 dir2 file1 file2 mmm text
Why I get list1 instead list2?
list1:
.
..
Af
FILE1
Af
FILE2
Ad
DIR1
Ad
DIR2
At
TEXT
Am
MMM
list2:
.
..
FILE1
FILE2
DIR1
DIR2
TEXT
MMM
I think this is a mistake(may be at work with long file names) and should
correct in
/packages/fs/fat/current/src/fatfs_supp.c in function
static int
read_next_raw_dentry(fatfs_disk_t *disk,
fatfs_data_pos_t *pos,
fat_raw_dir_entry_t *dentry)
{
...
+++if(dentry->attr == 16 /*dir*/ && dentry->attr == 32 /*file*/)
...
}
--
Configure bugmail: http://bugs.ecos.sourceware.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.