[Yaffs-archive] Re: Another bug found regarding dev/rdev
Charles Manning
manningc2@actrix.gen.nz
Fri, 20 Sep 2002 19:46:13 +1200
Andras
Two in one day! Good work. They must put good stuff in Hungarian beer!
Thanks for pointing this out. The stupid thing is that I saw this shadowing,
but thought it was benign.
You have also prompted me to clean up some of the warnings... :-).
I will fix and check in.
-- Charles
On Thu, 19 Sep 2002 21:20, Andras Toth wrote:
> Hello,
>
> Yet Another YAFFS Bug here :)
>
> The yaffs_mknod function had a parameter 'dev' and a local variable 'dev'.
> ( shadow problem ). The compiler sent a warning, I could not noticed it
> among the others.
> This problem caused the mknod command creating bad device entry with
> major=major=0.
>
> This is the wrong version:
>
> static int yaffs_mknod(struct inode *dir, struct dentry *dentry, int mode,
> int dev)
> ...
> obj = yaffs_MknodSpecial(parent,dentry->d_name.name,mode,current->uid,
> current->gid,dev);
> ...
>
> This is the good one:
>
> static int yaffs_mknod(struct inode *dir, struct dentry *dentry, int mode,
> int rdev)
> ...
> obj = yaffs_MknodSpecial(parent,dentry->d_name.name,mode,current->uid,
> current->gid,rdev);
> ...
>
> The 'only' difference is the dev -> rdev. I fixed it and looks good. I've
> managed to mount the YAFFS as root in a small StrongARM board.
> Kernel is loaded 'linearly' from a different NAND partition without YAFFS.
>
> I am very glad now and many-many thanks to the author(s) , saved my job :)
> ( I had many troubles with jffs2 with this NAND)
>
> Andras
---------------------------------------------------------------------------------------
This mailing list is hosted by Toby Churchill open software (www.toby-churchill.org).
If mailing list membership is no longer wanted you can remove yourself from the list by
sending an email to yaffs-request@toby-churchill.org with the text "unsubscribe"
(without the quotes) as the subject.