From owner-freebsd-geom@FreeBSD.ORG Fri Aug 26 10:42:22 2005 Return-Path: X-Original-To: freebsd-geom@freebsd.org Delivered-To: freebsd-geom@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6813916A41F; Fri, 26 Aug 2005 10:42:22 +0000 (GMT) (envelope-from pjd@garage.freebsd.pl) Received: from mail.garage.freebsd.pl (arm132.internetdsl.tpnet.pl [83.17.198.132]) by mx1.FreeBSD.org (Postfix) with ESMTP id CC81D43D45; Fri, 26 Aug 2005 10:42:21 +0000 (GMT) (envelope-from pjd@garage.freebsd.pl) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id 50D1F52C93; Fri, 26 Aug 2005 12:42:20 +0200 (CEST) Received: from localhost (ana50.internetdsl.tpnet.pl [83.17.82.50]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.garage.freebsd.pl (Postfix) with ESMTP id 42CC252BC1; Fri, 26 Aug 2005 12:42:12 +0200 (CEST) Date: Fri, 26 Aug 2005 12:41:49 +0200 From: Pawel Jakub Dawidek To: Takanori Watanabe Message-ID: <20050826104149.GD43700@garage.freebsd.pl> References: <200508261017.j7QAHgTo069421@ns.init-main.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="7DO5AaGCk89r4vaK" Content-Disposition: inline In-Reply-To: <200508261017.j7QAHgTo069421@ns.init-main.com> X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 7.0-CURRENT i386 User-Agent: mutt-ng devel (FreeBSD) X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on mail.garage.freebsd.pl X-Spam-Level: X-Spam-Status: No, score=-5.9 required=3.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.0.4 Cc: takawata@freebsd.org, freebsd-geom@freebsd.org Subject: Re: NTFS label patch. X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Aug 2005 10:42:22 -0000 --7DO5AaGCk89r4vaK Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Aug 26, 2005 at 07:17:42PM +0900, Takanori Watanabe wrote: +> Hi, I wrote NTFS volume label parser for geom_label. +> Now I mount NTFS by volume label-based name. +> If you interested in, plaese check. +> Please Cc: to me=20 +> Thanks. +>=20 +> http://www.init-main.com/gntfs/ Looks ok, but it needs one change for sure. When you do it: filerecp =3D g_read_data(cp, bf->bf_mftcn * bf->bf_spc * bf->bf_bps + recsi= ze * NTFS_VOLUMEINO, recsize, &error); you need to be sure that offset is ok: off_t offset; offset =3D bf->bf_mftcn * bf->bf_spc * bf->bf_bps + recsize * NTFS_VOLUMEIN= O; if ((offset % pp->sectorsize) !=3D 0) goto done; filerecp =3D g_read_data(cp, offset, recsize, &error); With this change it should be ok from GEOM/g_label point of view, so fell free to commit. Don't forget to update manual page. Thanks. --=20 Pawel Jakub Dawidek http://www.wheel.pl pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --7DO5AaGCk89r4vaK Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (FreeBSD) iD8DBQFDDvHtForvXbEpPzQRAoPeAJwLpSQIOlEULN69z5o0RigobYRg7gCfaNWN eY/SSxRyivFprjuSJsNXWGE= =5MgW -----END PGP SIGNATURE----- --7DO5AaGCk89r4vaK--