Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 2 Jul 2007 06:30:07 +0300
From:      Kostik Belousov <kostikbel@gmail.com>
To:        Brian Chu <soc@hbar.us>
Cc:        freebsd-fs@freebsd.org, Dennis Melentyev <dennis.melentyev@gmail.com>, Raaf <raaf@zen.mooo.com>, freebsd-stable@freebsd.org
Subject:   Re: Cannot mount Sony Ericsson mobile phone, msdosfs too restrictive?
Message-ID:  <20070702033007.GN2268@deviant.kiev.zoral.com.ua>
In-Reply-To: <47a4f3080707011454m6e06c97bu4764b32a65160ad6@mail.gmail.com>
References:  <4687FF75.3000108@zen.mooo.com> <b84edfa10707011305g4cffb298q70c3507f75121799@mail.gmail.com> <47a4f3080707011454m6e06c97bu4764b32a65160ad6@mail.gmail.com>

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

--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 <dennis.melentyev@gmail.com> 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 <raaf@zen.mooo.com>:
> >> 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--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070702033007.GN2268>