Fix building with CRAMFS but no JFFS2 support
PATCH 1/1 Fix building with CRAMFS but no JFFS2 support
Hi!
Fix building with CRAMFS but not JFFS2 support
fs/cramfs/cramfs.c +19 -2
@@ -27,7 +27,7 @@#include <common.h> #include <malloc.h> -#if (CONFIG_COMMANDS &CFG_CMD_JFFS2 ) +#if (CONFIG_COMMANDS &CFG_CMD_CRAMFS )#include <asm/byteorder.h> #include <linux/stat.h>
@@ -343,5 +343,22 @@ }return 1 ; } - +#else +int cramfs_load (char *loadoffset,struct part_info *info,char *filename) +{ +return -1 ; +} +int cramfs_ls (struct part_info *info,char *filename) +{ +return 0 ; +} +int cramfs_info (struct part_info *info) +{ +return 0 ; +} +int cramfs_check (struct part_info *info) +{ +return 0 ; +}#endif /* CFG_FS_CRAMFS */ +
Signature · 3 lines
- Harald Welte <[email protected]> http://openmoko.org/ ============================================================================ Software for the world's first truly open Free Software mobile phone
PATCH 1/1 Fix building with CRAMFS but no JFFS2 support
Quoted 11 lines · Harald Welte
Hi!
Fix building with CRAMFS but not JFFS2 support
Signed-off-by Harald Welte <[email protected]>Index:
u-boot.git/fs/cramfs/cramfs.c
===================================================================
fs/cramfs/cramfs.c 2007-02-07 16:48:01.000000000 +0100 line 30
Quoted 5 lines
fs/cramfs/cramfs.c 2007-02-07 16:48:01.000000000 +0100 renamed from fs/cramfs/cramfs.c 2007-02-07 16:47:39.000000000 +0100 +1
-1@@ -27,7 +27,7 @@ #include <common.h> #include <malloc.h> -#if (CONFIG_COMMANDS & CFG_CMD_JFFS2) +#if (CONFIG_COMMANDS & CFG_CMD_CRAMFS)
<<<original code>>>
fs/cramfs/cramfs.c 2007-02-07 16:48:01.000000000 +0100 line 31
Quoted 1 line
fs/cramfs/cramfs.c 2007-02-07 16:48:01.000000000 +0100 renamed from fs/cramfs/cramfs.c 2007-02-07 16:47:39.000000000 +0100 +1
-0+#else
<<<bunch of empty stubs>>>
fs/cramfs/cramfs.c 2007-02-07 16:48:01.000000000 +0100 line 33
Quoted 2 lines
fs/cramfs/cramfs.c 2007-02-07 16:48:01.000000000 +0100 renamed from fs/cramfs/cramfs.c 2007-02-07 16:47:39.000000000 +0100 +1
-0#endif /* CFG_FS_CRAMFS */ +
Hmmm...
This code will cause cramfs_* functions to be generated and linked into all u-boot images, for all boards (even if they are just empty stubs). I don't think this is what is wanted.
AFAICS, JFFS2 is the only external user, so the empty stubs should be conditional on CONFIG_FS_JFFS2. Alternately, the jffs2 code should be audited to see if it's reasonable to modify it to only generate calls to cramfs_* if cramfs is actually configured in.
Cheers,
g.
Signature · 4 lines
Grant Likely, B.Sc. P.Eng. Secret Lab Technologies Ltd. grant.likely at secretlab.ca (403) 399-0195