public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Jonathan McDowell <noodles@earth.li>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] [PATCH] Fix CRAMFS failure to compile if CFG_NO_FLASH.
Date: Tue, 6 Jun 2006 21:13:56 +0100	[thread overview]
Message-ID: <20060606201355.GW14634@earth.li> (raw)

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 */

                 reply	other threads:[~2006-06-06 20:13 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060606201355.GW14634@earth.li \
    --to=noodles@earth.li \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox