FS Endianess

Sam samueldotj at gmail.com
Mon Jul 11 06:23:08 UTC 2011


Thanks for the quick response.

Samuel


2011/7/11 Andrey V. Elsukov <bu7cher at 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   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
>
>


More information about the freebsd-fs mailing list