From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8159 invoked by alias); 18 Jun 2008 16:44:06 -0000 Received: (qmail 8151 invoked by uid 22791); 18 Jun 2008 16:44:06 -0000 X-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL,BAYES_00,SUBJECT_FUZZY_TION X-Spam-Check-By: sourceware.org Received: from anchor-post-33.mail.demon.net (HELO anchor-post-33.mail.demon.net) (194.217.242.91) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 18 Jun 2008 16:43:40 +0000 Received: from calivar.demon.co.uk ([83.104.54.243] helo=xl5.calivar.com) by anchor-post-33.mail.demon.net with esmtp (Exim 4.67) id 1K90kz-000LlH-By; Wed, 18 Jun 2008 16:43:37 +0000 Received: from xl5.calivar.com (localhost [127.0.0.1]) by xl5.calivar.com (Postfix) with ESMTP id 59FA21387B6; Wed, 18 Jun 2008 17:43:36 +0100 (BST) To: Frank Pagliughi Cc: ecos-devel@ecos.sourceware.org Subject: Re: 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> <48593730.1050600@mindspring.com> From: Nick Garnett Original-Sender: nickg@ecoscentric.com Date: Wed, 18 Jun 2008 16:44:00 -0000 In-Reply-To: <48593730.1050600@mindspring.com> Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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/msg00028.txt.bz2 Frank Pagliughi writes: > 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. This is already handled in the io/disk package. You mount /dev/diskN/M for partition M of disk N and /dev/diskN/0 for the whole disk. Partitioning is independent of filesystem type, so it must be done at a lower level that the FATFS. -- Nick Garnett eCos Kernel Architect eCosCentric Limited http://www.eCosCentric.com The eCos experts Barnwell House, Barnwell Drive, Cambridge, UK. Tel: +44 1223 245571 Registered in England and Wales: Reg No: 4422071