NTFS label patch.

Pawel Jakub Dawidek pjd at FreeBSD.org
Fri Aug 26 10:42:22 GMT 2005


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 at FreeBSD.org                           http://www.FreeBSD.org
FreeBSD committer                         Am I Evil? Yes, I Am!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-geom/attachments/20050826/38b8b100/attachment.bin


More information about the freebsd-geom mailing list