[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

mkfs.jffs2 build problem



Hi people,

I tried building mkfs.jffs2 from the latest CVS, it wouldn't
build out of the box.

Here are the changes I made to get it to compile;
(the first one is certainly not proper; the one on mkfs.jffs2.c
should be mostly fine).

Cheers,
/Y


diff -u -r1.29 jffs2.h
--- include/linux/jffs2.h       22 Jan 2003 11:59:23 -0000      1.29
+++ include/linux/jffs2.h       24 Jan 2003 18:12:46 -0000
@@ -15,6 +15,8 @@
 #ifndef __LINUX_JFFS2_H__
 #define __LINUX_JFFS2_H__
 
+#define os_to_jffs2_mode(x) (x)
+
 /* You must include something which defines the C99 uintXX_t types. 
    We don't do it from here because this file is used in too many
    different environments. */

diff -u -r1.32 mkfs.jffs2.c
--- util/mkfs.jffs2.c   12 Jan 2003 15:42:04 -0000      1.32
+++ util/mkfs.jffs2.c   24 Jan 2003 18:12:49 -0000
@@ -63,7 +63,7 @@
 #include <time.h>
 #include <getopt.h>
 #define crc32 __complete_crap
-#include <zlib.h>
+#include <linux/zlib.h>
 #undef crc32
 #include "crc32.h"
 
@@ -820,7 +820,7 @@
        ri.nodetype = cpu_to_je16(JFFS2_NODETYPE_INODE);
 
        ri.ino = cpu_to_je32(statbuf->st_ino);
-       ri.mode = cpu_to_je32(statbuf->st_mode);
+       ri.mode = cpu_to_jemode(statbuf->st_mode);
        ri.uid = cpu_to_je16(statbuf->st_uid);
        ri.gid = cpu_to_je16(statbuf->st_gid);
        ri.atime = cpu_to_je32(statbuf->st_atime);
@@ -922,7 +922,7 @@
                                &ri, sizeof(struct jffs2_unknown_node) - 4));
 
        ri.ino = cpu_to_je32(statbuf->st_ino);
-       ri.mode = cpu_to_je32(statbuf->st_mode);
+       ri.mode = cpu_to_jemode(statbuf->st_mode);
        ri.uid = cpu_to_je16(statbuf->st_uid);
        ri.gid = cpu_to_je16(statbuf->st_gid);
        ri.atime = cpu_to_je32(statbuf->st_atime);
@@ -964,7 +964,7 @@
                                &ri, sizeof(struct jffs2_unknown_node) - 4));
 
        ri.ino = cpu_to_je32(statbuf->st_ino);
-       ri.mode = cpu_to_je32(statbuf->st_mode);
+       ri.mode = cpu_to_jemode(statbuf->st_mode);
        ri.uid = cpu_to_je16(statbuf->st_uid);
        ri.gid = cpu_to_je16(statbuf->st_gid);
        ri.atime = cpu_to_je32(statbuf->st_atime);
@@ -1004,7 +1004,7 @@
                                &ri, sizeof(struct jffs2_unknown_node) - 4));
 
        ri.ino = cpu_to_je32(statbuf->st_ino);
-       ri.mode = cpu_to_je32(statbuf->st_mode);
+       ri.mode = cpu_to_jemode(statbuf->st_mode);
        ri.uid = cpu_to_je16(statbuf->st_uid);
        ri.gid = cpu_to_je16(statbuf->st_gid);
        ri.atime = cpu_to_je32(statbuf->st_atime);



To unsubscribe from this list: send the line "unsubscribe jffs-dev" in
the body of a message to majordomo@xxxxxxx.com