From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 504 invoked by alias); 18 Jun 2008 16:26:52 -0000 Received: (qmail 495 invoked by uid 22791); 18 Jun 2008 16:26:51 -0000 X-Spam-Status: No, hits=-1.3 required=5.0 tests=AWL,BAYES_05,SUBJECT_FUZZY_TION X-Spam-Check-By: sourceware.org Received: from elasmtp-dupuy.atl.sa.earthlink.net (HELO elasmtp-dupuy.atl.sa.earthlink.net) (209.86.89.62) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 18 Jun 2008 16:26:27 +0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=dk20050327; d=mindspring.com; b=tIKZzPxxhHwoV4Sfi0yOx8/sAwxlEtDw4tG/JeFStlNp7EUQLKPhSfuhd3nGsrhV; h=Received:Message-ID:Date:From:User-Agent:MIME-Version:To:Subject:References:In-Reply-To:Content-Type:Content-Transfer-Encoding:X-ELNK-Trace:X-Originating-IP; Received: from [71.80.44.180] (helo=[192.168.0.5]) by elasmtp-dupuy.atl.sa.earthlink.net with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.67) (envelope-from ) id 1K90UL-0008Hq-Bh for ecos-devel@ecos.sourceware.org; Wed, 18 Jun 2008 12:26:25 -0400 Message-ID: <48593730.1050600@mindspring.com> Date: Wed, 18 Jun 2008 16:26:00 -0000 From: Frank Pagliughi User-Agent: Thunderbird 1.5.0.12 (X11/20071019) MIME-Version: 1.0 To: ecos-devel@ecos.sourceware.org Subject: Partition support for FAT file system References: <92187523-464B-4EFE-A03F-AA54E4AD3E6A@wh2.tu-dresden.de> <20080618095232.GA10893@lunn.ch> <38B53518-83B4-47A6-A64D-FC8266DB0602@wh2.tu-dresden.de> <20080618102248.GB10893@lunn.ch> <136E7846-7252-43D7-A7A4-02ED213ADFF8@wh2.tu-dresden.de> In-Reply-To: <136E7846-7252-43D7-A7A4-02ED213ADFF8@wh2.tu-dresden.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-ELNK-Trace: 4d82f965df0f6dd9e3f977c6d1ea408f0a9da525759e2654a6caa85368251c43e778eed02961f0cf0cdf93a589ab4c3c350badd9bab72f9c350badd9bab72f9c X-Originating-IP: 71.80.44.180 X-IsSubscribed: yes Mailing-List: contact ecos-devel-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: ecos-devel-owner@ecos.sourceware.org X-SW-Source: 2008-06/txt/msg00027.txt.bz2 It appears that the FAT file system in eCos works if the "whole disk" is a single partition, meaning that the FAT Boot Sector is written into the MBR at sector zero. But if the disk uses a partition table in the MBR, then the code doesn't understand it, rejects the disk as non-FAT, and fails the mount. This happens even if the disk contains only a single partition. I guess a quick enhancement would be for fatfs_mount() or fatfs_init() to check the partition table, see if there's at least one entry, and mount the first one it finds. If there are no partition entries, *then* check if the MBR is a valid FAT boot sector. This would make most disks (and compact flash cards) at least partially useful, rather than being rejected out right. As a longer term enhancement, supporting multiple partitions would be nice, but ideas on how to resolve the devs/mtab idea of a disk to different partitions would be appreciated. - Frank