Skip to contentSkip to conversation

Fix building with CRAMFS but no JFFS2 support

PATCH New Harald Welte 2 participants 2 messages Dec 19, 2007 – Jan 9, 2008 Cramfs filesystem

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix building with CRAMFS but no JFFS2 support

Hi!

Fix building with CRAMFS but not JFFS2 support

fs/cramfs/cramfs.c +1 -1
Index: u-boot/fs/cramfs/cramfs.c
===================================================================
@@ -27,7 +27,7 @@
 #include <common.h>
 #include <malloc.h>
 
-#if defined(CONFIG_CMD_JFFS2)
+#if defined(CONFIG_CMD_CRAMFS)
 
 #include <asm/byteorder.h>
 #include <linux/stat.h>
common/cmd_jffs2.c +9 -0
Index: u-boot/common/cmd_jffs2.c
===================================================================
@@ -170,10 +170,19 @@
 static struct mtd_device *current_dev = NULL;
 static u8 current_partnum = 0;
 
+#if defined(CONFIG_CMD_CRAMFS)
 extern int cramfs_check (struct part_info *info);
 extern int cramfs_load (char *loadoffset, struct part_info *info, char *filename);
 extern int cramfs_ls (struct part_info *info, char *filename);
 extern int cramfs_info (struct part_info *info);
+#else
+/* defining empty macros for function names is ugly but avoids ifdef clutter
+ * all over the code */
+#define cramfs_check(x)		(0)
+#define cramfs_load(x,y,z)	(-1)
+#define cramfs_ls(x,y)		(0)
+#define cramfs_info(x)		(0)
+#endif
 
 static struct part_info* jffs2_part_info(struct mtd_device *dev, unsigned int part_num);
 
Signature · 13 lines
- Harald Welte <[email protected]>          	        http://openmoko.org/
============================================================================
Software for the world's first truly open Free Software mobile phone

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
U-Boot-Users mailing list
U-Boot-Users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users
#1 lore raw

PATCH 1/1 Fix building with CRAMFS but no JFFS2 support

Quoted 4 lines · In message <[email protected]> you wrote:

Fix building with CRAMFS but not JFFS2 support

Applied, thanks.

Best regards,

Wolfgang Denk

Signature · 5 lines
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
He'd heard her use that sweet, innocent  tone  of  voice  before.  It
meant that, pretty soon, there was going to be trouble.
                                        - Terry Pratchett, _Truckers_