> > > What lacks is a fingerprint detector, and iirc -long time ago- FAT has
> > > a very easy to detect fingerprint.
> > >
> > > I'll dig into FAT documentation tonight.
> > I read the document repeatedly and did much tests. If you read the
> > document, you may use BS_OEMName or BS_FilSysType, however, these
> > don't have a meaning.
> Hmmm. You seem to be right there. In my OS (IBM PC only) I checked the
> partition table (see below).
> The first question I want answered: Should I just call myself stupid for
> trying to mount NTFS as VFAT, or should we consider this a real issue that
> needs fixing ? (I see the problem as a generic problem. There must be
> other combinations of filesystems and partition types that pass the
> test, but are wrong). IMHO the latter, for every lost partition makes an
> angry linux user.
> Anyway. I have already been thinking further. Maybe I'm talking nonsense,
> but I'll give it a try.
> The type of a partition is written in the partition table, or something
> similar. Maybe we should check that ?
Partition type isn't available to fs driver. Think about mounting
Seems you guys are discussing non-problem here. What really needs to be done
is to add more sanity checks to FAT superblock detection/validation code:
* signatures like 55AA at end of 1st sector
* sane values for various superblock data (if you see "FAT copies: 146"
it is more than enough to tell it's not a FAT, right?)
If anyone feels so inclined, please go to fs/fat/inode.c:fat_read_super()
and hack on it. Send your patches to Alexander Viro <firstname.lastname@example.org>
and tighten your seatbelt ;-)
> While mounting a partition, the vfs layer tries to determine the partition
> type, and passes that info to the filesystem driver, which checks whether
> that partition type can be mounted by the driver. If no partition type is
> provided by the vfs layer (for the partition type is not available in the
> used partition table, or whatever), the fs driver must try to find out
-- vda - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to email@example.com More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Sat Feb 23 2002 - 21:00:18 EST