X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=common%2Fcmd_jffs2.c;h=1b67e73f1119d03864b23afeaa197ed2533546f2;hb=55ac7a7490b55da56659f95d82a0c83b9756df27;hp=777607a0ca110a336feed40185d20cbefcdede22;hpb=c76fe47425afc7d5d670ff0539823c85d65d9c42;p=platform%2Fkernel%2Fu-boot.git diff --git a/common/cmd_jffs2.c b/common/cmd_jffs2.c index 777607a..1b67e73 100644 --- a/common/cmd_jffs2.c +++ b/common/cmd_jffs2.c @@ -93,9 +93,6 @@ #include #include #include - -#if defined(CONFIG_CMD_JFFS2) - #include #if defined(CONFIG_CMD_NAND) @@ -170,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); @@ -2191,5 +2197,3 @@ U_BOOT_CMD( #endif /* #ifdef CONFIG_JFFS2_CMDLINE */ /***************************************************/ - -#endif /* CFG_CMD_JFFS2 */