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

next in thread | previous in thread | raw e-mail | index | archive | help
Thanks for the quick response.

Samuel


2011/7/11 Andrey V. Elsukov <bu7cher@yandex.ru>:
> 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 =A0 getushort(x) =A0 =A0le16dec(x)
> bpb.h:#define =A0 getulong(x) =A0 =A0 le32dec(x)
> bpb.h:#define =A0 putushort(p, v) le16enc(p, v)
> bpb.h:#define =A0 putulong(p, v) =A0le32enc(p, v)
>
> --
> WBR, Andrey V. Elsukov
>
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CA%2B1iFvfygaHh6irJ0AVCiFV0JGtNfQeuQxKN7-zwpex0kbjzfw>