[Yaffs-archive] Another bug found regarding dev/rdev

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Andras Toth
Date:  
To: yaffs
Subject: [Yaffs-archive] Another bug found regarding dev/rdev
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 with the text "unsubscribe"
(without the quotes) as the subject.