From owner-freebsd-ppc@FreeBSD.ORG Fri Dec 22 21:03:14 2006 Return-Path: X-Original-To: ppc@FreeBSD.org Delivered-To: freebsd-ppc@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A168416A506 for ; Fri, 22 Dec 2006 21:03:14 +0000 (UTC) (envelope-from grehan@freebsd.org) Received: from dommail.onthenet.com.au (dommail.OntheNet.com.au [203.13.70.57]) by mx1.freebsd.org (Postfix) with ESMTP id 2960E13C47A for ; Fri, 22 Dec 2006 21:03:13 +0000 (UTC) (envelope-from grehan@freebsd.org) Received: from [10.33.24.110] (nat-198-95-226-228.netapp.com [198.95.226.228]) by dommail.onthenet.com.au (MOS 3.5.7-GR) with ESMTP id CKQ02610 (AUTH peterg@ptree32.com.au); Sat, 23 Dec 2006 04:47:56 +1000 (EST) Message-ID: <458C2874.8030404@freebsd.org> Date: Fri, 22 Dec 2006 10:48:20 -0800 From: Peter Grehan User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.8b) Gecko/20051014 MIME-Version: 1.0 To: Rafal Jaworowski References: <38D687BE-F674-4954-B6D3-8D25A8E9B9B5@mac.com> <4588846D.3040709@semihalf.com> <45888E72.6050406@freebsd.org> <458956DB.7040009@semihalf.com> <4589844A.5070206@freebsd.org> <458C0555.5070707@semihalf.com> In-Reply-To: <458C0555.5070707@semihalf.com> Content-Type: multipart/mixed; boundary="------------000401080705050202000502" Cc: ppc@FreeBSD.org Subject: Re: HFS+ X-BeenThere: freebsd-ppc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the PowerPC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Dec 2006 21:03:14 -0000 This is a multi-part message in MIME format. --------------000401080705050202000502 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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. --------------000401080705050202000502 Content-Type: text/plain; name="msdosfs_root.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="msdosfs_root.patch" 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", --------------000401080705050202000502--