public inbox for ecos-devel@sourceware.org
 help / color / mirror / Atom feed
From: Nick Garnett <nickg@ecoscentric.com>
To: Frank Pagliughi <fpagliughi@mindspring.com>
Cc: ecos-devel@ecos.sourceware.org
Subject: Re: Partition support for FAT file system
Date: Wed, 18 Jun 2008 16:44:00 -0000	[thread overview]
Message-ID: <m3r6au4rt4.fsf@xl5.calivar.com> (raw)
In-Reply-To: <48593730.1050600@mindspring.com>

Frank Pagliughi <fpagliughi@mindspring.com> 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

  reply	other threads:[~2008-06-18 16:44 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-18  9:36 Strange buildsystem behaviour Lars Poeschel
2008-06-18  9:53 ` Andrew Lunn
2008-06-18 10:07   ` Lars Poeschel
2008-06-18 10:23     ` Andrew Lunn
2008-06-18 10:58       ` Lars Poeschel
2008-06-18 16:26         ` Partition support for FAT file system Frank Pagliughi
2008-06-18 16:44           ` Nick Garnett [this message]
2008-06-18 17:01             ` Frank Pagliughi
2008-06-18 19:26               ` Nick Garnett
2008-06-20 13:56                 ` Frank Pagliughi
2008-06-18 19:28               ` Frank Pagliughi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3r6au4rt4.fsf@xl5.calivar.com \
    --to=nickg@ecoscentric.com \
    --cc=ecos-devel@ecos.sourceware.org \
    --cc=fpagliughi@mindspring.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).