Sergey, Your patch is broken. Somehow returns are being dropped. Fortunately, it was a simple enough patch that I was able to apply it by hand. You were, by the way, mistaken. Linux kernel will mount YAFFS2 filesystem without it. However, when the read of the mtd super struct fails, the error returned (EPERM) will be confusing to the end user. EINVAL isn't really the right thing to return -- there are other possible errors than invalid argument that might cause the read to fail -- but it is probably as good as any as a catchall. I'll test the new version tomorrow and push a patch later in the day. Marty > -----Original Message----- > From: yaffs-bounces@stoneboat.aleph1.co.uk > [mailto:yaffs-bounces@stoneboat.aleph1.co.uk] On Behalf Of > Sergey Kubushyn > Sent: Wednesday, October 12, 2005 10:21 AM > To: yaffs-list > Subject: [Yaffs] Make YAFFS2 work as a root FS, patch > > This one is also tiny but critical. Linux kernel will NOT > mount YAFFS2 filesystem without it. I will not be explaining > why leaving it as an exercize for a reader. > > === Cut === > diff -urN linux-2.6.12.orig/fs/yaffs2/yaffs_fs.c > linux-2.6.12/fs/yaffs2/yaffs_fs.c > --- linux-2.6.12.orig/fs/yaffs2/yaffs_fs.c 2005-10-11 > 18:01:36.000000000 -0700 > +++ linux-2.6.12/fs/yaffs2/yaffs_fs.c 2005-10-11 > 18:15:57.000000000 -0700 > @@ -1492,7 +1492,7 @@ > static int yaffs_internal_read_super_mtd(struct super_block > *sb, void *data, > int silent) > { > - return yaffs_internal_read_super(1, sb, data, silent) ? 0 : -1; > + return yaffs_internal_read_super(1, sb, data, silent) ? > 0 : -EINVAL; > } > > static struct super_block *yaffs_read_super(struct > file_system_type *fs, @@ -1529,7 +1529,7 @@ static int > yaffs2_internal_read_super_mtd(struct super_block *sb, void *data, > int silent) > { > - return yaffs_internal_read_super(2, sb, data, silent) ? 0 : -1; > + return yaffs_internal_read_super(2, sb, data, silent) ? > 0 : -EINVAL; > } > > static struct super_block *yaffs2_read_super(struct > file_system_type *fs, === Cut === > > --- > ****************************************************************** > * KSI@home KOI8 Net < > The impossible we do immediately. * > * Las Vegas NV, USA < > Miracles require 24-hour notice. * > ****************************************************************** > > > _______________________________________________ > yaffs mailing list > yaffs@stoneboat.aleph1.co.uk > http://stoneboat.aleph1.co.uk/cgi-bin/mailman/listinfo/yaffs >