public inbox for ecos-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug 1001193] New: abnormal behavior readdir on fat16
@ 2011-04-07 19:33 bugzilla-daemon
  2013-04-15 17:58 ` [Bug 1001193] " bugzilla-daemon
  0 siblings, 1 reply; 3+ messages in thread
From: bugzilla-daemon @ 2011-04-07 19:33 UTC (permalink / raw)
  To: unassigned

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 the assignee for the bug.


^ permalink raw reply	[flat|nested] 3+ messages in thread
* [Bug 1001193] New: abnormal behavior readdir on fat16
@ 2011-04-07 19:33 bugzilla-daemon
  0 siblings, 0 replies; 3+ messages in thread
From: bugzilla-daemon @ 2011-04-07 19:33 UTC (permalink / raw)
  To: ecos-bugs

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.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-04-15 17:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-07 19:33 [Bug 1001193] New: abnormal behavior readdir on fat16 bugzilla-daemon
2013-04-15 17:58 ` [Bug 1001193] " bugzilla-daemon
  -- strict thread matches above, loose matches on Subject: below --
2011-04-07 19:33 [Bug 1001193] New: " bugzilla-daemon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).