Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 11 Jul 2011 09:30:51 +0400
From:      "Andrey V. Elsukov" <bu7cher@yandex.ru>
To:        Sam <samueldotj@gmail.com>
Cc:        freebsd-fs@freebsd.org
Subject:   Re: FS Endianess
Message-ID:  <4E1A8A8B.4020005@yandex.ru>
In-Reply-To: <CA%2B1iFvdLTR_4_WMvVGhU__keYALy5=FLmJ4VbyY2OBD0YV=m3w@mail.gmail.com>
References:  <CA%2B1iFvdLTR_4_WMvVGhU__keYALy5=FLmJ4VbyY2OBD0YV=m3w@mail.gmail.com>

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

[-- Attachment #1 --]
On 11.07.2011 8:48, Sam wrote:
> Hi,
> 
> I am under the assumption that a Filesystem created on big endian
> machine cant be read on little endian machine and vice versa. However
> I am able to mount FAT formatted(on Windows PC) USB flash drive on
> FreeBSD(PowerPC - BigEndian) and able to view contents of a text file.
> I am not able to locate FS code where it does the byte conversion. Can
> somebody kindly point me the code? Or my assumption is wrong?

[freebsd msdosfs]> pwd
/usr/home/devel/freebsd/base/head/sys/fs/msdosfs
[freebsd msdosfs]> grep -E '[0-9]+(dec|enc)' *
bpb.h:#define   getushort(x)    le16dec(x)
bpb.h:#define   getulong(x)     le32dec(x)
bpb.h:#define   putushort(p, v) le16enc(p, v)
bpb.h:#define   putulong(p, v)  le32enc(p, v)

-- 
WBR, Andrey V. Elsukov


[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)

iQEcBAEBAgAGBQJOGoqaAAoJEAHF6gQQyKF6n+4H/3Ey+r6au6HOjIHXyxmyTqGh
rxuo/zApM/GKKbDoES/0Oh11w4Eeb020eCH9JuhX9/SyF11rNCUce/1Jg/qIMCXe
Zx7ripvm4Bf0lb2FhEFqKMG6oTdO37pTrQYR9BGaKJ9m5thV4bm3Np2kN9DmSscY
qEmRmgAM5Ecrit/9g+WovOgtJeMRCQKWMYEB99eCswTJMxZ7roFmlo1OM12qFzuW
tnOA9sDu7eFic75ViaGlPNNpxbIUtTVkpHk3iiqJs2lz/m6R0TJdIxEzRI6ds3W6
F3DcXVWCWMd+QC1V2pNi/2EqDpvmvvcSvs+OLDJyjaP5KCi3ZLFnJvHX1HtfkMo=
=GuQv
-----END PGP SIGNATURE-----

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