From mint-bounce@lists.fishpool.fi  Fri Aug 29 10:49:13 2008
X-Virus-Scanned: amavisd-new at demon.co.uk
Subject: Re: [MiNT] FreeMiNT & MiNTlib patchset - add new support
From: Alan Hourihane <alanh@fairlite.co.uk>
To: Frank Naumann <fnaumann@boerde.de>
Cc: mint <mint@fishpool.com>
In-Reply-To: <1219228901.15620.18.camel@jetpack>
References: <1214745779.28954.415.camel@jetpack.demon.co.uk>
	 <1219148919.28716.28.camel@jetpack>
	 <alpine.LFD.1.10.0808192318170.3331@localhost.localdomain>
	 <1219218974.15039.2.camel@jetpack> <1219219385.15039.7.camel@jetpack>
	 <alpine.LFD.1.10.0808201011400.3331@localhost.localdomain>
	 <1219222338.15039.10.camel@jetpack>
	 <alpine.LFD.1.10.0808201100510.3331@localhost.localdomain>
	 <1219223882.15039.13.camel@jetpack>
	 <alpine.LFD.1.10.0808201128440.3331@localhost.localdomain>
	 <1219227750.15620.13.camel@jetpack>
	 <alpine.LFD.1.10.0808201235020.3331@localhost.localdomain>
	 <1219228901.15620.18.camel@jetpack>
Content-Type: text/plain
Date: Fri, 29 Aug 2008 15:44:07 +0100
Message-Id: <1220021047.14042.10.camel@jetpack.demon.co.uk>
Mime-Version: 1.0
X-Mailer: Evolution 2.22.2 
Content-Transfer-Encoding: 7bit
X-ecartis-version: Ecartis v1.0.0
Sender: mint-bounce@lists.fishpool.fi
Errors-to: mint-bounce@lists.fishpool.fi
X-original-sender: alanh@fairlite.co.uk
Precedence: bulk
List-help: <mailto:ecartis@lists.fishpool.fi?Subject=help>
List-unsubscribe: <mailto:mint-request@lists.fishpool.fi?Subject=unsubscribe>
List-Id: <mint.lists.fishpool.fi>
X-List-ID: <mint.lists.fishpool.fi>
List-subscribe: <mailto:mint-request@lists.fishpool.fi?Subject=subscribe>
List-owner: <mailto:tjhukkan@fishpool.fi>
List-post: <mailto:mint@lists.fishpool.fi>

Frank,

Actually the filesystem code does need modifying.

Take this snippet of diff for example.

Index: sys/xfs/ext2fs/ext2dev.c
===================================================================
RCS file: /mint/freemint/sys/xfs/ext2fs/ext2dev.c,v
retrieving revision 1.9
diff -u -r1.9 ext2dev.c
--- sys/xfs/ext2fs/ext2dev.c    13 Jul 2007 21:32:53 -0000      1.9
+++ sys/xfs/ext2fs/ext2dev.c    29 Aug 2008 14:40:31 -0000
@@ -72,8 +72,11 @@

        if (!EXT2_ISREG (le2cpu16 (c->in.i_mode)))
        {
-               DEBUG (("Ext2-FS [%c]: e_open: not a regular file (#%
ld)", f->fc.dev+'A', c->inode));
-               return EACCES;
+               if (!(EXT2_ISDIR (le2cpu16 (c->in.i_mode)) && 
+                    ((f->flags & O_RWMODE) == O_RDONLY))) {
+                       DEBUG (("Ext2-FS [%c]: e_open: not a regular
file or read-only directory (#%ld)", f->fc.dev+'A', c->inode));
+                       return EACCES;
+               }
        }

        if (((f->flags & O_RWMODE) == O_WRONLY)

The !EXT2_ISREG(..) test will fail when a directory is passed in.

So we do need to modify the filesystem code regardless.

Alan.

