Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 26 Aug 2005 12:41:49 +0200
From:      Pawel Jakub Dawidek <pjd@FreeBSD.org>
To:        Takanori Watanabe <takawata@init-main.com>
Cc:        takawata@freebsd.org, freebsd-geom@freebsd.org
Subject:   Re: NTFS label patch.
Message-ID:  <20050826104149.GD43700@garage.freebsd.pl>
In-Reply-To: <200508261017.j7QAHgTo069421@ns.init-main.com>
References:  <200508261017.j7QAHgTo069421@ns.init-main.com>

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

[-- Attachment #1 --]
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 
+> Thanks.
+> 
+> http://www.init-main.com/gntfs/

Looks ok, but it needs one change for sure. When you do it:

filerecp = g_read_data(cp, bf->bf_mftcn * bf->bf_spc * bf->bf_bps + recsize * NTFS_VOLUMEINO, recsize, &error);

you need to be sure that offset is ok:

off_t offset;

offset = bf->bf_mftcn * bf->bf_spc * bf->bf_bps + recsize * NTFS_VOLUMEINO;
if ((offset % pp->sectorsize) != 0)
	goto done;
filerecp = 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.

-- 
Pawel Jakub Dawidek                       http://www.wheel.pl
pjd@FreeBSD.org                           http://www.FreeBSD.org
FreeBSD committer                         Am I Evil? Yes, I Am!

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

iD8DBQFDDvHtForvXbEpPzQRAoPeAJwLpSQIOlEULN69z5o0RigobYRg7gCfaNWN
eY/SSxRyivFprjuSJsNXWGE=
=5MgW
-----END PGP SIGNATURE-----

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