From owner-freebsd-fs@FreeBSD.ORG Mon Jul 11 05:31:16 2011 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A79A0106566B for ; Mon, 11 Jul 2011 05:31:16 +0000 (UTC) (envelope-from bu7cher@yandex.ru) Received: from forward2.mail.yandex.net (forward2.mail.yandex.net [77.88.46.7]) by mx1.freebsd.org (Postfix) with ESMTP id 534BB8FC0A for ; Mon, 11 Jul 2011 05:31:16 +0000 (UTC) Received: from smtp4.mail.yandex.net (smtp4.mail.yandex.net [77.88.46.104]) by forward2.mail.yandex.net (Yandex) with ESMTP id 7B9AD12A10E4; Mon, 11 Jul 2011 09:31:14 +0400 (MSD) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1310362274; bh=07EuOP1ukrYttZD9wMPyKCEEZEBKGF0vqw1ro77OOX8=; h=Message-ID:Date:From:MIME-Version:To:CC:Subject:References: In-Reply-To:Content-Type; b=UTruUJIgBsEXWJmk0NebD+bGyes0hAw3SXsh6DvlWthEsykjBpmKdvLk7QW13/ccm T2SsM9Az1qkdg60Gjcr0EWcFkvlOo32BEoSRUOCfN/dqu7AZpxtbFDH1ZSXzqO7RWo sZ9fNQkFN2oIYRhoIIc0JdhY/tA2mPbPz89uWnlI= Received: from [127.0.0.1] (proxy.kirov.so-ups.ru [77.72.136.146]) by smtp4.mail.yandex.net (Yandex) with ESMTPSA id 3AE62649809A; Mon, 11 Jul 2011 09:31:14 +0400 (MSD) Message-ID: <4E1A8A8B.4020005@yandex.ru> Date: Mon, 11 Jul 2011 09:30:51 +0400 From: "Andrey V. Elsukov" User-Agent: Mozilla Thunderbird 1.5 (FreeBSD/20051231) MIME-Version: 1.0 To: Sam References: In-Reply-To: X-Enigmail-Version: 1.1.1 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig70BB18F571F8E3506A283DC3" X-Yandex-Spam: 1 Cc: freebsd-fs@freebsd.org Subject: Re: FS Endianess 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, 11 Jul 2011 05:31:16 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig70BB18F571F8E3506A283DC3 Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: quoted-printable On 11.07.2011 8:48, Sam wrote: > Hi, >=20 > 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) --=20 WBR, Andrey V. Elsukov --------------enig70BB18F571F8E3506A283DC3 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----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----- --------------enig70BB18F571F8E3506A283DC3--