From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22182 invoked by alias); 7 Apr 2011 19:33:32 -0000 Received: (qmail 22169 invoked by uid 22791); 7 Apr 2011 19:33:31 -0000 X-SWARE-Spam-Status: No, hits=-0.7 required=5.0 tests=AWL,BAYES_00,FSL_RU_URL X-Spam-Check-By: sourceware.org Received: from hagrid.ecoscentric.com (HELO mail.ecoscentric.com) (212.13.207.197) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 07 Apr 2011 19:33:28 +0000 Received: from localhost (hagrid.ecoscentric.com [127.0.0.1]) by mail.ecoscentric.com (Postfix) with ESMTP id 917D62F80005 for ; Thu, 7 Apr 2011 20:33:26 +0100 (BST) Received: from mail.ecoscentric.com ([127.0.0.1]) by localhost (hagrid.ecoscentric.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id HwGiFfSDR1Bi; Thu, 7 Apr 2011 20:33:25 +0100 (BST) From: bugzilla-daemon@bugs.ecos.sourceware.org To: ecos-bugs@ecos.sourceware.org Subject: [Bug 1001193] New: abnormal behavior readdir on fat16 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: eCos X-Bugzilla-Component: FAT filesystem X-Bugzilla-Keywords: X-Bugzilla-Severity: minor X-Bugzilla-Who: arteminus@yandex.ru X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: low X-Bugzilla-Assigned-To: unassigned@bugs.ecos.sourceware.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: X-Bugzilla-URL: http://bugs.ecos.sourceware.org/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Date: Thu, 07 Apr 2011 19:33:00 -0000 Mailing-List: contact ecos-bugs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: ecos-bugs-owner@sourceware.org X-SW-Source: 2011/txt/msg00809.txt.bz2 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.