HFS+

Peter Grehan grehan at freebsd.org
Fri Dec 22 13:03:14 PST 2006


Hi Rafal,

> Would your patches allow for pen drive root mount? I'd be glad to have a 
> look if so.

  Patch attached. Yes, should be no problem from the pen drive so long 
as you get the partition right: /dev/da0s?

later,

Peter.
-------------- next part --------------
Index: sys/fs/msdosfs/msdosfs_vfsops.c
===================================================================
RCS file: /home/ncvs/src/sys/fs/msdosfs/msdosfs_vfsops.c,v
retrieving revision 1.155
diff -d -u -r1.155 msdosfs_vfsops.c
--- sys/fs/msdosfs/msdosfs_vfsops.c	9 Dec 2006 01:49:19 -0000	1.155
+++ sys/fs/msdosfs/msdosfs_vfsops.c	22 Dec 2006 18:08:49 -0000
@@ -160,8 +160,21 @@
 		pmp->pm_uid = v;
 	if (1 == vfs_scanopt(mp->mnt_optnew, "mask", "%d", &v))
 		pmp->pm_mask = v & ALLPERMS;
+#ifdef MSDOSFS_ROOT
+	/*
+	 * For root mounts the option won't be set and the mask
+	 * will be zero, so set it to all-permissions or no files
+	 * can be accessed.
+	 */
+	else if (pmp->pm_mask == 0)
+		pmp->pm_mask = ALLPERMS;	
+#endif
 	if (1 == vfs_scanopt(mp->mnt_optnew, "dirmask", "%d", &v))
 		pmp->pm_dirmask = v & ALLPERMS;
+#ifdef MSDOSFS_ROOT
+	else if (pmp->pm_dirmask == 0)
+		pmp->pm_dirmask = ALLPERMS;
+#endif
 	vfs_flagopt(mp->mnt_optnew, "shortname",
 	    &pmp->pm_flags, MSDOSFSMNT_SHORTNAME);
 	vfs_flagopt(mp->mnt_optnew, "shortnames",


More information about the freebsd-ppc mailing list