r1058 - trunk/src/target/u-boot/patches
laforge at sita.openmoko.org
laforge at sita.openmoko.org
Tue Feb 20 19:54:48 CET 2007
Author: laforge
Date: 2007-02-20 19:54:48 +0100 (Tue, 20 Feb 2007)
New Revision: 1058
Modified:
trunk/src/target/u-boot/patches/uboot-cramfs_but_no_jffs2.patch
Log:
Incorporate cleanup as per u-boot developers reviews
Modified: trunk/src/target/u-boot/patches/uboot-cramfs_but_no_jffs2.patch
===================================================================
--- trunk/src/target/u-boot/patches/uboot-cramfs_but_no_jffs2.patch 2007-02-20 18:53:38 UTC (rev 1057)
+++ trunk/src/target/u-boot/patches/uboot-cramfs_but_no_jffs2.patch 2007-02-20 18:54:48 UTC (rev 1058)
@@ -2,10 +2,10 @@
Signed-off-by: Harald Welte <laforge at openmoko.org>
-Index: u-boot.git/fs/cramfs/cramfs.c
+Index: u-boot/fs/cramfs/cramfs.c
===================================================================
---- u-boot.git.orig/fs/cramfs/cramfs.c 2007-02-07 16:47:39.000000000 +0100
-+++ u-boot.git/fs/cramfs/cramfs.c 2007-02-07 16:48:01.000000000 +0100
+--- u-boot.orig/fs/cramfs/cramfs.c 2007-02-17 11:46:26.000000000 +0100
++++ u-boot/fs/cramfs/cramfs.c 2007-02-17 11:54:36.000000000 +0100
@@ -27,7 +27,7 @@
#include <common.h>
#include <malloc.h>
@@ -15,28 +15,27 @@
#include <asm/byteorder.h>
#include <linux/stat.h>
-@@ -343,5 +343,22 @@
- }
- return 1;
- }
--
+Index: u-boot/common/cmd_jffs2.c
+===================================================================
+--- u-boot.orig/common/cmd_jffs2.c 2007-02-17 11:47:51.000000000 +0100
++++ u-boot/common/cmd_jffs2.c 2007-02-17 14:08:25.000000000 +0100
+@@ -170,10 +170,19 @@
+ static struct mtd_device *current_dev = NULL;
+ static u8 current_partnum = 0;
+
++#ifdef CFG_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
-+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 */
-+
-
++/* 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);
+
More information about the commitlog
mailing list