Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 2 Apr 2004 10:51:32 -0500 (EST)
From:      Robert Watson <rwatson@freebsd.org>
To:        Benjamin von Mossner <benny@vonmossner.de>
Cc:        freebsd-fs@freebsd.org
Subject:   Re: msdosfs and FAT16
Message-ID:  <Pine.NEB.3.96L.1040402104858.26412C-200000@fledge.watson.org>
Resent-Message-ID: <20040403141444.GA25329@vonmossner.de>
In-Reply-To: <20040401162253.GA69135@vonmossner.de>

index | next in thread | previous in thread | raw e-mail

[-- Attachment #1 --]

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@fledge.watson.org      Senior Research Scientist, McAfee Research


[-- Attachment #2 --]
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
home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.NEB.3.96L.1040402104858.26412C-200000>