msdosfs and FAT16
Robert Watson
rwatson at freebsd.org
Sat Apr 3 06:15:03 PST 2004
On Thu, 1 Apr 2004, Benjamin von Mossner wrote:
> i have a problem mounting my mp3player, attached via umass on FreeBSD
> 5.2.1. It is recogniced correctly (from my point of view).
Hey, I wonder if this is the same mp3player as the Acer multi-function
player I bought recently when in Taipei.
> Now when i try mounting, i recieve the following error.
> # mount -t msdosfs /dev/da0s1 /mnt/mass
> msdosfs: /dev/da0s1: Invalid argument
> #
Because that's certainly the same error.
> The device is found by fdisk, i "could" do a newfs for sure and
> furthermore i can mount it under Solaris 9, OSX and Billy-OS but not
> FreeBSD 5.2.1....
>
> Help would be greatly appreciated :)
There's some excessively strong sanity checking in the msdosfs code in
FreeBSD, which is commented out in Apple's version that they grabbed from
us. I commented part of it out in -CURRENT to get my player working,
although not yet all of it. You probably want
src/sys/fs/msdosfs/msdosfs_vfsops.c:1.119. I've attached a copy of the
patch. I have plans to merge this to -STABLE for 4.10, but haven't had a
chance to test it on a -STABLE box. I don't anticipate any complications.
Robert N M Watson FreeBSD Core Team, TrustedBSD Projects
robert at fledge.watson.org Senior Research Scientist, McAfee Research
-------------- next part --------------
Index: msdosfs_vfsops.c
===================================================================
RCS file: /home/ncvs/src/sys/fs/msdosfs/msdosfs_vfsops.c,v
retrieving revision 1.118
retrieving revision 1.119
diff -u -r1.118 -r1.119
--- msdosfs_vfsops.c 21 Feb 2004 22:47:19 -0000 1.118
+++ msdosfs_vfsops.c 14 Mar 2004 23:28:12 -0000 1.119
@@ -1,4 +1,4 @@
-/* $FreeBSD: src/sys/fs/msdosfs/msdosfs_vfsops.c,v 1.118 2004/02/21 22:47:19 bde Exp $ */
+/* $FreeBSD: src/sys/fs/msdosfs/msdosfs_vfsops.c,v 1.119 2004/03/14 23:28:12 rwatson Exp $ */
/* $NetBSD: msdosfs_vfsops.c,v 1.51 1997/11/17 15:36:58 ws Exp $ */
/*-
@@ -398,7 +398,7 @@
/* XXX - We should probably check more values here */
if (!pmp->pm_BytesPerSec || !SecPerClust
- || !pmp->pm_Heads || pmp->pm_Heads > 255
+ || !pmp->pm_Heads
#ifdef PC98
|| !pmp->pm_SecPerTrack || pmp->pm_SecPerTrack > 255) {
#else
More information about the freebsd-newbies
mailing list