From owner-freebsd-fs@FreeBSD.ORG Mon Jul 2 03:30:24 2007 Return-Path: X-Original-To: freebsd-fs@freebsd.org Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1413516A421; Mon, 2 Jul 2007 03:30:24 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from relay02.kiev.sovam.com (relay02.kiev.sovam.com [62.64.120.197]) by mx1.freebsd.org (Postfix) with ESMTP id 9A52D13C46E; Mon, 2 Jul 2007 03:30:23 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from [89.162.146.170] (helo=skuns.kiev.zoral.com.ua) by relay02.kiev.sovam.com with esmtps (TLSv1:AES256-SHA:256) (Exim 4.67) (envelope-from ) id 1I5CcF-0009Gr-4G; Mon, 02 Jul 2007 06:30:21 +0300 Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by skuns.kiev.zoral.com.ua (8.14.1/8.14.1) with ESMTP id l623U20U083904 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 2 Jul 2007 06:30:02 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.1/8.14.1) with ESMTP id l623U7V1015921; Mon, 2 Jul 2007 06:30:07 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.1/8.14.1/Submit) id l623U7Dn015920; Mon, 2 Jul 2007 06:30:07 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 2 Jul 2007 06:30:07 +0300 From: Kostik Belousov To: Brian Chu Message-ID: <20070702033007.GN2268@deviant.kiev.zoral.com.ua> References: <4687FF75.3000108@zen.mooo.com> <47a4f3080707011454m6e06c97bu4764b32a65160ad6@mail.gmail.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="i7uJIdOrCTgA6ZgY" Content-Disposition: inline In-Reply-To: <47a4f3080707011454m6e06c97bu4764b32a65160ad6@mail.gmail.com> User-Agent: Mutt/1.4.2.2i X-Virus-Scanned: ClamAV version 0.90.2, clamav-milter version 0.90.2 on skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-1.4 required=5.0 tests=ALL_TRUSTED autolearn=failed version=3.1.8 X-Spam-Checker-Version: SpamAssassin 3.1.8 (2007-02-13) on skuns.kiev.zoral.com.ua X-Scanner-Signature: 6bd56f30920205a35a58b455a86ead09 X-DrWeb-checked: yes X-SpamTest-Envelope-From: kostikbel@gmail.com X-SpamTest-Group-ID: 00000000 X-SpamTest-Header: Not Detected X-SpamTest-Info: Profiles 1187 [June 28 2007] X-SpamTest-Info: helo_type=3 X-SpamTest-Method: none X-SpamTest-Rate: 0 X-SpamTest-Status: Not detected X-SpamTest-Status-Extended: not_detected X-SpamTest-Version: SMTP-Filter Version 3.0.0 [0255], KAS30/Release Cc: freebsd-fs@freebsd.org, Dennis Melentyev , Raaf , freebsd-stable@freebsd.org Subject: Re: Cannot mount Sony Ericsson mobile phone, msdosfs too restrictive? X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2007 03:30:24 -0000 --i7uJIdOrCTgA6ZgY Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Jul 01, 2007 at 05:54:58PM -0400, Brian Chu wrote: > Raaf, >=20 > What's the size of the memory stick? Is it 32MB like Dennis has? >=20 > The check for the field that affected you isn't critical to msdosfs' > operation, but the field itself is specified to be non-zero. > Konstantin, is it alright to remove this field? >=20 Brian, I would expect to get the answer from you. In any case, you could do this on your branch and have tested it for some time. >=20 > On 7/1/07, Dennis Melentyev wrote: > >Well, had the same problem. > >For me, it looks like SE is using FAT12 (!!!Not 16!!!) on a devive > >larger than 32MB. Could have something slipped off my mind, but quite > >close. It is a BROKEN msdosfs on a stick. > > > >Just re-formated 1Gb flash with FAT32 using card reader and both K750i > >and FreeBSD are happy. > > > >2007/7/1, Raaf : > >> Hi, i got a Sony Ericsson mobile phone that came with a pre-formatted > >> memory stick that i'm unable to mount in FreeBSD (it mounts fine in > >> Linux). > >> > >> After investigating i found out that the FreeBSD msdsofs driver bails > >> out on the following code (the pmp->pm_Heads being zero): > >> > >> ---------------------------------- > >> if (!pmp->pm_BytesPerSec || !SecPerClust > >> || !pmp->pm_Heads > >> #ifdef PC98 > >> || !pmp->pm_SecPerTrack || pmp->pm_SecPerTrack > 255) { > >> #else > >> || !pmp->pm_SecPerTrack || pmp->pm_SecPerTrack > 63) { > >> #endif > >> error =3D EINVAL; > >> goto error_exit; > >> } > >> ---------------------------------- > >> > >> Removing the check for pmp->pm_Heads fixes it for me. > >> > >> Is the check for pmp->pm_Heads really necessary? > >> > >> Grepping through the msdosfs sources i can only see it being used for > >> validation and not used in any calculation (the same applies for the > >> pmp->pm_SecPerTrack value) > >> > >> > >> --- sys/fs/msdosfs/msdosfs_vfsops.c.orig Sun Jul 1 20:42:14 20= 07 > >> +++ sys/fs/msdosfs/msdosfs_vfsops.c Sun Jul 1 20:46:57 2007 > >> @@ -483,7 +483,6 @@ > >> > >> /* XXX - We should probably check more values here */ > >> if (!pmp->pm_BytesPerSec || !SecPerClust > >> - || !pmp->pm_Heads > >> #ifdef PC98 > >> || !pmp->pm_SecPerTrack || pmp->pm_SecPerTrack > 255) { > >> #else > >> > >> > >> _______________________________________________ > >> freebsd-stable@freebsd.org mailing list > >> http://lists.freebsd.org/mailman/listinfo/freebsd-stable > >> To unsubscribe, send any mail to "freebsd-stable-unsubscribe@freebsd.o= rg" > >> > > > > > >-- > >Dennis Melentyev > >_______________________________________________ > >freebsd-fs@freebsd.org mailing list > >http://lists.freebsd.org/mailman/listinfo/freebsd-fs > >To unsubscribe, send any mail to "freebsd-fs-unsubscribe@freebsd.org" > > --i7uJIdOrCTgA6ZgY Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (FreeBSD) iD8DBQFGiHE+C3+MBN1Mb4gRApbfAKCaA1pTDGVdHHE1CtrNwwwTwV8aBQCghmdz UcrUYg0NkjVUAKekgDV4ow0= =JLhH -----END PGP SIGNATURE----- --i7uJIdOrCTgA6ZgY--