Skip to contentSkip to conversation

Patch: linux-2.5.2-pre8/fs/jffs2 compilation fixes

PATCH Adam J. Richter 2 participants 2 messages Jan 5, 2002 – Jan 7, 2002 Journalling flash file system V2 (JFFS2)

lore
Share & tools
lore
#0 lore raw

linux-2.5.2-pre8/fs/jffs2 required a few minor
changes to make it compile. dir.c needed to include <linux/sched.h> for CURRENT_TIME, and there were a couple of kdev-related changes. Here is the patch.

It compiles. I have not otherwise tested it.

Signature · 4 lines
Adam J. Richter     __     ______________   4880 Stevens Creek Blvd, Suite 104
[email protected]     \ /                  San Jose, California 95129-1034
+1 408 261-6630         | g g d r a s i l   United States of America
fax +1 408 261-6631      "Free Software For The Rest Of Us."

Only in linux/fs/jffs2: CVS

fs/jffs2/dir.c +1 -0
diff -u -r linux-2.5.2-pre8/fs/jffs2/dir.c linux/fs/jffs2/dir.c
@@ -37,6 +37,7 @@
 
 #include <linux/kernel.h>
 #include <linux/slab.h>
+#include <linux/sched.h>	/* for CURRENT_TIME */
 #include <linux/fs.h>
 #include <linux/jffs2.h>
 #include <linux/jffs2_fs_i.h>
fs/jffs2/readinode.c +1 -1
diff -u -r linux-2.5.2-pre8/fs/jffs2/readinode.c linux/fs/jffs2/readinode.c
@@ -437,7 +437,7 @@
 	case S_IFSOCK:
 	case S_IFIFO:
 		inode->i_op = &jffs2_file_inode_operations;
-		init_special_inode(inode, inode->i_mode, kdev_t_to_nr(MKDEV(rdev>>8, rdev&0xff)));
+		init_special_inode(inode, inode->i_mode, MKDEV(rdev>>8, rdev&0xff));
 		break;
 
 	default:
fs/jffs2/super.c +1 -1
diff -u -r linux-2.5.2-pre8/fs/jffs2/super.c linux/fs/jffs2/super.c
@@ -208,7 +208,7 @@
 	c = JFFS2_SB_INFO(sb);
 	memset(c, 0, sizeof(*c));
 	
-	c->mtd = get_mtd_device(NULL, MINOR(sb->s_dev));
+	c->mtd = get_mtd_device(NULL, minor(sb->s_dev));
 	if (!c->mtd) {
 		D1(printk(KERN_DEBUG "jffs2: MTD device #%u doesn't appear to exist\n", MINOR(sb->s_dev)));
 		return NULL;
maintainer
#1 lore raw
Quoted 2 lines · [email protected] said:

dir.c needed to include <linux/sched.h> for CURRENT_TIME, and there were a couple of kdev-related changes. Here is the patch.

Thanks. This, and the JFFS changes, look OK. I've merged the sched.h inclusion into CVS, albeit without the comment - the Linux include files are screwed up enough that it's best not to pretend there's any logic behind what you have to include :)

I'm not merging the s/MAJOR/major/ changes into my tree just yet - I'm still vaguely hoping the new macro will change name before 2.5.2 proper.

--
dwmw2