public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot-Users] [PATCH] Fix CRAMFS failure to compile if CFG_NO_FLASH.
@ 2006-06-06 20:13 Jonathan McDowell
  0 siblings, 0 replies; only message in thread
From: Jonathan McDowell @ 2006-06-06 20:13 UTC (permalink / raw)
  To: u-boot

I'm working on u-boot support for the Amstrad Delta (E3) video phone.
Currently this is running with NAND but not NOR support. However when
JFFS2 support is compiled into u-boot this pulls in CRAMFS, which fails
to compile if CFG_NO_FLASH is set. The attached patch fixes this by
adding stub cramfs functions in the case when this is set, which allows
JFFS2 support to build and run.

Patch is against current git.

J.

-- 
/-\                             |   How I wish, how I wish you were
|@/  Debian GNU/Linux Developer |                here.
\-                              |
-------------- next part --------------
diff --git a/fs/cramfs/cramfs.c b/fs/cramfs/cramfs.c
index 48e7f63..12476f2 100644
--- a/fs/cramfs/cramfs.c
+++ b/fs/cramfs/cramfs.c
@@ -29,6 +29,8 @@ #include <malloc.h>
 
 #if (CONFIG_COMMANDS & CFG_CMD_JFFS2)
 
+#ifndef CFG_NO_FLASH
+
 #include <asm/byteorder.h>
 #include <linux/stat.h>
 #include <jffs2/jffs2.h>
@@ -344,4 +346,28 @@ int cramfs_check (struct part_info *info
 	return 1;
 }
 
+#else /* CFG_NO_FLASH */
+
+int cramfs_check(struct part_info *info)
+{
+	return 0;
+}
+
+int cramfs_info (struct part_info *info)
+{
+	return 0;
+}
+
+int cramfs_load (char *loadoffset, struct part_info *info, char *filename)
+{
+	return -1;
+}
+
+int cramfs_ls (struct part_info *info, char *filename)
+{
+	return -1;
+}
+
+#endif /*CFG_NO_FLASH */
+
 #endif /* CFG_FS_CRAMFS */

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2006-06-06 20:13 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-06 20:13 [U-Boot-Users] [PATCH] Fix CRAMFS failure to compile if CFG_NO_FLASH Jonathan McDowell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox