]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
Fix building with CRAMFS but not JFFS2 support
authorHarald Welte <laforge@openmoko.org>
Wed, 19 Dec 2007 13:09:58 +0000 (14:09 +0100)
committerWolfgang Denk <wd@denx.de>
Wed, 9 Jan 2008 12:04:37 +0000 (13:04 +0100)
Signed-off-by: Harald Welte <laforge@openmoko.org>
common/cmd_jffs2.c
fs/cramfs/cramfs.c

index efe9eb7be4ca1b1b46e8122b306ec3124478295f..1b67e73f1119d03864b23afeaa197ed2533546f2 100644 (file)
@@ -167,10 +167,19 @@ struct list_head devices;
 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);
 
index 369d1f16740a2abbb040842f994c694f966f8234..e53c783e5a4bed7a2c95452b15ffbf973abdc2d4 100644 (file)
@@ -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>