From 4e109ae98294a5ca7ff848b7652c7bfd4023a94a Mon Sep 17 00:00:00 2001 From: Jon Loeliger Date: Mon, 11 Jun 2007 19:02:20 -0500 Subject: fs/: Augment CONFIG_COMMANDS tests with defined(CONFIG_CMD_*). This is a compatibility step that allows both the older form and the new form to co-exist for a while until the older can be removed entirely. All transformations are of the form: Before: #if (CONFIG_COMMANDS & CFG_CMD_AUTOSCRIPT) After: #if (CONFIG_COMMANDS & CFG_CMD_AUTOSCRIPT) || defined(CONFIG_CMD_AUTOSCRIPT) Signed-off-by: Jon Loeliger --- fs/cramfs/cramfs.c | 2 +- fs/cramfs/uncompress.c | 2 +- fs/ext2/dev.c | 2 +- fs/ext2/ext2fs.c | 2 +- fs/fat/fat.c | 14 ++++++++------ fs/fat/file.c | 2 +- fs/fdos/dev.c | 2 +- fs/fdos/fat.c | 2 +- fs/fdos/fdos.c | 2 +- fs/fdos/fs.c | 2 +- fs/fdos/subdir.c | 2 +- fs/fdos/vfat.c | 2 +- fs/jffs2/compr_lzari.c | 2 +- fs/jffs2/compr_lzo.c | 2 +- fs/jffs2/compr_rtime.c | 2 +- fs/jffs2/compr_rubin.c | 2 +- fs/jffs2/compr_zlib.c | 2 +- fs/jffs2/jffs2_1pass.c | 16 ++++++++-------- fs/jffs2/jffs2_nand_1pass.c | 2 +- fs/jffs2/mini_inflate.c | 2 +- fs/reiserfs/dev.c | 2 +- fs/reiserfs/mode_string.c | 2 +- fs/reiserfs/reiserfs.c | 2 +- 23 files changed, 37 insertions(+), 35 deletions(-) mode change 100755 => 100644 fs/fat/fat.c (limited to 'fs') diff --git a/fs/cramfs/cramfs.c b/fs/cramfs/cramfs.c index 48e7f63aa4..37d0cbad9a 100644 --- a/fs/cramfs/cramfs.c +++ b/fs/cramfs/cramfs.c @@ -27,7 +27,7 @@ #include #include -#if (CONFIG_COMMANDS & CFG_CMD_JFFS2) +#if (CONFIG_COMMANDS & CFG_CMD_JFFS2) || defined(CONFIG_CMD_JFFS2) #include #include diff --git a/fs/cramfs/uncompress.c b/fs/cramfs/uncompress.c index 170832a9c5..18d1f0f531 100644 --- a/fs/cramfs/uncompress.c +++ b/fs/cramfs/uncompress.c @@ -25,7 +25,7 @@ #include #include -#if (CONFIG_COMMANDS & CFG_CMD_JFFS2) +#if (CONFIG_COMMANDS & CFG_CMD_JFFS2) || defined(CONFIG_CMD_JFFS2) static z_stream stream; diff --git a/fs/ext2/dev.c b/fs/ext2/dev.c index 1469e982b7..3904e812ff 100644 --- a/fs/ext2/dev.c +++ b/fs/ext2/dev.c @@ -25,7 +25,7 @@ #include -#if (CONFIG_COMMANDS & CFG_CMD_EXT2) +#if (CONFIG_COMMANDS & CFG_CMD_EXT2) || defined(CONFIG_CMD_EXT2) #include #include diff --git a/fs/ext2/ext2fs.c b/fs/ext2/ext2fs.c index 9cf2fb7ba4..6caae3551a 100644 --- a/fs/ext2/ext2fs.c +++ b/fs/ext2/ext2fs.c @@ -25,7 +25,7 @@ #include -#if (CONFIG_COMMANDS & CFG_CMD_EXT2) +#if (CONFIG_COMMANDS & CFG_CMD_EXT2) || defined(CONFIG_CMD_EXT2) #include #include #include diff --git a/fs/fat/fat.c b/fs/fat/fat.c old mode 100755 new mode 100644 index 3007608360..fd9358829a --- a/fs/fat/fat.c +++ b/fs/fat/fat.c @@ -31,7 +31,7 @@ #include #include -#if (CONFIG_COMMANDS & CFG_CMD_FAT) +#if (CONFIG_COMMANDS & CFG_CMD_FAT) || defined(CONFIG_CMD_FAT) /* * Convert a string to lowercase. @@ -90,9 +90,9 @@ fat_register_device(block_dev_desc_t *dev_desc, int part_no) part_offset=0; } else { -#if ((CONFIG_COMMANDS & CFG_CMD_IDE) || \ - (CONFIG_COMMANDS & CFG_CMD_SCSI) || \ - (CONFIG_COMMANDS & CFG_CMD_USB) || \ +#if ((CONFIG_COMMANDS & CFG_CMD_IDE) || defined(CONFIG_CMD_IDE) || \ + (CONFIG_COMMANDS & CFG_CMD_SCSI) || defined(CONFIG_CMD_SCSI) || \ + (CONFIG_COMMANDS & CFG_CMD_USB) || defined(CONFIG_CMD_USB) || \ (defined(CONFIG_MMC) && defined(CONFIG_LPC2292)) || \ defined(CONFIG_SYSTEMACE) ) disk_partition_t info; @@ -975,8 +975,10 @@ file_fat_detectfs(void) printf("No current device\n"); return 1; } -#if (CONFIG_COMMANDS & CFG_CMD_IDE) || (CONFIG_COMMANDS & CFG_CMD_SCSI) || \ - (CONFIG_COMMANDS & CFG_CMD_USB) || (CONFIG_MMC) +#if (CONFIG_COMMANDS & CFG_CMD_IDE) || defined(CONFIG_CMD_IDE) || \ + (CONFIG_COMMANDS & CFG_CMD_SCSI) || defined(CONFIG_CMD_SCSI) || \ + (CONFIG_COMMANDS & CFG_CMD_USB) || defined(CONFIG_CMD_USB) || \ + (CONFIG_MMC) printf("Interface: "); switch(cur_dev->if_type) { case IF_TYPE_IDE : printf("IDE"); break; diff --git a/fs/fat/file.c b/fs/fat/file.c index f999ac5a25..34d046163b 100644 --- a/fs/fat/file.c +++ b/fs/fat/file.c @@ -32,7 +32,7 @@ #include #include -#if (CONFIG_COMMANDS & CFG_CMD_FAT) +#if (CONFIG_COMMANDS & CFG_CMD_FAT) || defined(CONFIG_CMD_FAT) /* Supported filesystems */ static const struct filesystem filesystems[] = { diff --git a/fs/fdos/dev.c b/fs/fdos/dev.c index 5dea5cd788..334d07366d 100644 --- a/fs/fdos/dev.c +++ b/fs/fdos/dev.c @@ -28,7 +28,7 @@ #include "dos.h" #include "fdos.h" -#if (CONFIG_COMMANDS & CFG_CMD_FDOS) +#if (CONFIG_COMMANDS & CFG_CMD_FDOS) || defined(CONFIG_CMD_FDOS) #define NB_HEADS 2 #define NB_TRACKS 80 diff --git a/fs/fdos/fat.c b/fs/fdos/fat.c index 2ef2371e17..7f26e2e22f 100644 --- a/fs/fdos/fat.c +++ b/fs/fdos/fat.c @@ -26,7 +26,7 @@ #include #include -#if (CONFIG_COMMANDS & CFG_CMD_FDOS) +#if (CONFIG_COMMANDS & CFG_CMD_FDOS) || defined(CONFIG_CMD_FDOS) #include "dos.h" #include "fdos.h" diff --git a/fs/fdos/fdos.c b/fs/fdos/fdos.c index a29f43d978..5cae2e151e 100644 --- a/fs/fdos/fdos.c +++ b/fs/fdos/fdos.c @@ -25,7 +25,7 @@ #include #include -#if (CONFIG_COMMANDS & CFG_CMD_FDOS) +#if (CONFIG_COMMANDS & CFG_CMD_FDOS) || defined(CONFIG_CMD_FDOS) #include #include "dos.h" #include "fdos.h" diff --git a/fs/fdos/fs.c b/fs/fdos/fs.c index 3b9d09e490..0fcf1a775a 100644 --- a/fs/fdos/fs.c +++ b/fs/fdos/fs.c @@ -26,7 +26,7 @@ #include #include -#if (CONFIG_COMMANDS & CFG_CMD_FDOS) +#if (CONFIG_COMMANDS & CFG_CMD_FDOS) || defined(CONFIG_CMD_FDOS) #include "dos.h" #include "fdos.h" diff --git a/fs/fdos/subdir.c b/fs/fdos/subdir.c index 97b25047ae..deaccf159f 100644 --- a/fs/fdos/subdir.c +++ b/fs/fdos/subdir.c @@ -26,7 +26,7 @@ #include #include -#if (CONFIG_COMMANDS & CFG_CMD_FDOS) +#if (CONFIG_COMMANDS & CFG_CMD_FDOS) || defined(CONFIG_CMD_FDOS) #include "dos.h" #include "fdos.h" diff --git a/fs/fdos/vfat.c b/fs/fdos/vfat.c index 46a464b293..31028df130 100644 --- a/fs/fdos/vfat.c +++ b/fs/fdos/vfat.c @@ -25,7 +25,7 @@ #include #include -#if (CONFIG_COMMANDS & CFG_CMD_FDOS) +#if (CONFIG_COMMANDS & CFG_CMD_FDOS) || defined(CONFIG_CMD_FDOS) #include #include "dos.h" diff --git a/fs/jffs2/compr_lzari.c b/fs/jffs2/compr_lzari.c index 828b6e5515..a94f9ff657 100644 --- a/fs/jffs2/compr_lzari.c +++ b/fs/jffs2/compr_lzari.c @@ -50,7 +50,7 @@ All rights reserved. Permission granted for non-commercial use. #include -#if ((CONFIG_COMMANDS & CFG_CMD_JFFS2) && defined(CONFIG_JFFS2_LZO_LZARI)) +#if ((CONFIG_COMMANDS & CFG_CMD_JFFS2) || defined(CONFIG_CMD_JFFS2)) && defined(CONFIG_JFFS2_LZO_LZARI) #include #include diff --git a/fs/jffs2/compr_lzo.c b/fs/jffs2/compr_lzo.c index b6c590ac8f..7c71730070 100644 --- a/fs/jffs2/compr_lzo.c +++ b/fs/jffs2/compr_lzo.c @@ -67,7 +67,7 @@ #include -#if ((CONFIG_COMMANDS & CFG_CMD_JFFS2) && defined(CONFIG_JFFS2_LZO_LZARI)) +#if ((CONFIG_COMMANDS & CFG_CMD_JFFS2) || defined(CONFIG_CMD_JFFS2)) && defined(CONFIG_JFFS2_LZO_LZARI) #include #include diff --git a/fs/jffs2/compr_rtime.c b/fs/jffs2/compr_rtime.c index 9bb4f1bcb6..adb84a4ed9 100644 --- a/fs/jffs2/compr_rtime.c +++ b/fs/jffs2/compr_rtime.c @@ -46,7 +46,7 @@ */ #include -#if (CONFIG_COMMANDS & CFG_CMD_JFFS2) +#if (CONFIG_COMMANDS & CFG_CMD_JFFS2) || defined(CONFIG_CMD_JFFS2) #include diff --git a/fs/jffs2/compr_rubin.c b/fs/jffs2/compr_rubin.c index 74577d9c62..b93977c054 100644 --- a/fs/jffs2/compr_rubin.c +++ b/fs/jffs2/compr_rubin.c @@ -39,7 +39,7 @@ */ #include -#if (CONFIG_COMMANDS & CFG_CMD_JFFS2) +#if (CONFIG_COMMANDS & CFG_CMD_JFFS2) || defined(CONFIG_CMD_JFFS2) #include #include diff --git a/fs/jffs2/compr_zlib.c b/fs/jffs2/compr_zlib.c index d88d0f8f36..b85a86e47a 100644 --- a/fs/jffs2/compr_zlib.c +++ b/fs/jffs2/compr_zlib.c @@ -37,7 +37,7 @@ #include #include -#if (CONFIG_COMMANDS & CFG_CMD_JFFS2) +#if (CONFIG_COMMANDS & CFG_CMD_JFFS2) || defined(CONFIG_CMD_JFFS2) #include #include diff --git a/fs/jffs2/jffs2_1pass.c b/fs/jffs2/jffs2_1pass.c index 41ff4c1fbb..6a7d7f7fac 100644 --- a/fs/jffs2/jffs2_1pass.c +++ b/fs/jffs2/jffs2_1pass.c @@ -117,7 +117,7 @@ #include #include -#if (CONFIG_COMMANDS & CFG_CMD_JFFS2) +#if (CONFIG_COMMANDS & CFG_CMD_JFFS2) || defined(CONFIG_CMD_JFFS2) #include #include @@ -143,7 +143,7 @@ /* keeps pointer to currentlu processed partition */ static struct part_info *current_part; -#if defined(CONFIG_JFFS2_NAND) && (CONFIG_COMMANDS & CFG_CMD_NAND) +#if (defined(CONFIG_JFFS2_NAND) && ((CONFIG_COMMANDS & CFG_CMD_NAND) || defined(CONFIG_CMD_NAND)) #if defined(CFG_NAND_LEGACY) #include #else @@ -277,7 +277,7 @@ static void put_fl_mem_nand(void *buf) #endif /* #if defined(CONFIG_JFFS2_NAND) && (CONFIG_COMMANDS & CFG_CMD_NAND) */ -#if (CONFIG_COMMANDS & CFG_CMD_FLASH) +#if (CONFIG_COMMANDS & CFG_CMD_FLASH) || defined(CONFIG_CMD_FLASH) /* * Support for jffs2 on top of NOR-flash * @@ -311,12 +311,12 @@ static inline void *get_fl_mem(u32 off, u32 size, void *ext_buf) { struct mtdids *id = current_part->dev->id; -#if (CONFIG_COMMANDS & CFG_CMD_FLASH) +#if (CONFIG_COMMANDS & CFG_CMD_FLASH) || defined(CONFIG_CMD_FLASH) if (id->type == MTD_DEV_TYPE_NOR) return get_fl_mem_nor(off); #endif -#if defined(CONFIG_JFFS2_NAND) && (CONFIG_COMMANDS & CFG_CMD_NAND) +#if defined(CONFIG_JFFS2_NAND) && ((CONFIG_COMMANDS & CFG_CMD_NAND) || defined(CONFIG_CMD_NAND)) if (id->type == MTD_DEV_TYPE_NAND) return get_fl_mem_nand(off, size, ext_buf); #endif @@ -329,12 +329,12 @@ static inline void *get_node_mem(u32 off) { struct mtdids *id = current_part->dev->id; -#if (CONFIG_COMMANDS & CFG_CMD_FLASH) +#if (CONFIG_COMMANDS & CFG_CMD_FLASH) || defined(CONFIG_CMD_FLASH) if (id->type == MTD_DEV_TYPE_NOR) return get_node_mem_nor(off); #endif -#if defined(CONFIG_JFFS2_NAND) && (CONFIG_COMMANDS & CFG_CMD_NAND) +#if defined(CONFIG_JFFS2_NAND) && ((CONFIG_COMMANDS & CFG_CMD_NAND) || defined(CONFIG_CMD_NAND) if (id->type == MTD_DEV_TYPE_NAND) return get_node_mem_nand(off); #endif @@ -345,7 +345,7 @@ static inline void *get_node_mem(u32 off) static inline void put_fl_mem(void *buf) { -#if defined(CONFIG_JFFS2_NAND) && (CONFIG_COMMANDS & CFG_CMD_NAND) +#if defined(CONFIG_JFFS2_NAND) && ((CONFIG_COMMANDS & CFG_CMD_NAND) || defined(CONFIG_CMD_NAND) struct mtdids *id = current_part->dev->id; if (id->type == MTD_DEV_TYPE_NAND) diff --git a/fs/jffs2/jffs2_nand_1pass.c b/fs/jffs2/jffs2_nand_1pass.c index e78af7578b..b9cdcbfa56 100644 --- a/fs/jffs2/jffs2_nand_1pass.c +++ b/fs/jffs2/jffs2_nand_1pass.c @@ -1,6 +1,6 @@ #include -#if !defined(CFG_NAND_LEGACY) && (CONFIG_COMMANDS & CFG_CMD_JFFS2) +#if !defined(CFG_NAND_LEGACY) && ((CONFIG_COMMANDS & CFG_CMD_JFFS2) || defined(CONFIG_CMD_JFFS2)) #include #include diff --git a/fs/jffs2/mini_inflate.c b/fs/jffs2/mini_inflate.c index 4f511ec1a4..568c292749 100644 --- a/fs/jffs2/mini_inflate.c +++ b/fs/jffs2/mini_inflate.c @@ -25,7 +25,7 @@ #include -#if (CONFIG_COMMANDS & CFG_CMD_JFFS2) +#if (CONFIG_COMMANDS & CFG_CMD_JFFS2) || defined(CONFIG_CMD_JFFS2) #include diff --git a/fs/reiserfs/dev.c b/fs/reiserfs/dev.c index 6f6056f337..6f7c9d263b 100644 --- a/fs/reiserfs/dev.c +++ b/fs/reiserfs/dev.c @@ -19,7 +19,7 @@ #include -#if (CONFIG_COMMANDS & CFG_CMD_REISER) +#if (CONFIG_COMMANDS & CFG_CMD_REISER) || defined(CONFIG_CMD_REISER) #include #include diff --git a/fs/reiserfs/mode_string.c b/fs/reiserfs/mode_string.c index bc565fbddd..9c460347da 100644 --- a/fs/reiserfs/mode_string.c +++ b/fs/reiserfs/mode_string.c @@ -26,7 +26,7 @@ #include -#if (CONFIG_COMMANDS & CFG_CMD_REISER) +#if (CONFIG_COMMANDS & CFG_CMD_REISER) || defined(CONFIG_CMD_REISER) #include #if ( S_ISUID != 04000 ) || ( S_ISGID != 02000 ) || ( S_ISVTX != 01000 ) \ diff --git a/fs/reiserfs/reiserfs.c b/fs/reiserfs/reiserfs.c index 31c25ebc7b..d9ee2cd97f 100644 --- a/fs/reiserfs/reiserfs.c +++ b/fs/reiserfs/reiserfs.c @@ -29,7 +29,7 @@ */ #include -#if (CONFIG_COMMANDS & CFG_CMD_REISER) +#if (CONFIG_COMMANDS & CFG_CMD_REISER) || defined(CONFIG_CMD_REISER) #include #include -- cgit v1.2.3 From e4dbe1b215f5c6c462e76909d240bd96472b84de Mon Sep 17 00:00:00 2001 From: Wolfgang Denk Date: Thu, 5 Jul 2007 17:56:27 +0200 Subject: Fixing some typos etc. introduced mainly by cfg patches. Signed-off-by: Wolfgang Denk --- fs/jffs2/jffs2_1pass.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'fs') diff --git a/fs/jffs2/jffs2_1pass.c b/fs/jffs2/jffs2_1pass.c index 6a7d7f7fac..af2a8e2806 100644 --- a/fs/jffs2/jffs2_1pass.c +++ b/fs/jffs2/jffs2_1pass.c @@ -143,7 +143,8 @@ /* keeps pointer to currentlu processed partition */ static struct part_info *current_part; -#if (defined(CONFIG_JFFS2_NAND) && ((CONFIG_COMMANDS & CFG_CMD_NAND) || defined(CONFIG_CMD_NAND)) +#if (defined(CONFIG_JFFS2_NAND) && \ + ((CONFIG_COMMANDS & CFG_CMD_NAND) || defined(CONFIG_CMD_NAND)) ) #if defined(CFG_NAND_LEGACY) #include #else @@ -334,7 +335,8 @@ static inline void *get_node_mem(u32 off) return get_node_mem_nor(off); #endif -#if defined(CONFIG_JFFS2_NAND) && ((CONFIG_COMMANDS & CFG_CMD_NAND) || defined(CONFIG_CMD_NAND) +#if defined(CONFIG_JFFS2_NAND) && \ + (CONFIG_COMMANDS & CFG_CMD_NAND) || defined(CONFIG_CMD_NAND) if (id->type == MTD_DEV_TYPE_NAND) return get_node_mem_nand(off); #endif @@ -345,7 +347,8 @@ static inline void *get_node_mem(u32 off) static inline void put_fl_mem(void *buf) { -#if defined(CONFIG_JFFS2_NAND) && ((CONFIG_COMMANDS & CFG_CMD_NAND) || defined(CONFIG_CMD_NAND) +#if defined(CONFIG_JFFS2_NAND) && \ + (CONFIG_COMMANDS & CFG_CMD_NAND) || defined(CONFIG_CMD_NAND) struct mtdids *id = current_part->dev->id; if (id->type == MTD_DEV_TYPE_NAND) -- cgit v1.2.3 From dd60d1223b99a88a7216f3e041fe40634ad4c2bb Mon Sep 17 00:00:00 2001 From: Jon Loeliger Date: Mon, 9 Jul 2007 17:56:50 -0500 Subject: fs/: Remove obsolete references to CONFIG_COMMANDS Signed-off-by: Jon Loeliger --- fs/cramfs/cramfs.c | 2 +- fs/cramfs/uncompress.c | 2 +- fs/ext2/dev.c | 2 +- fs/ext2/ext2fs.c | 2 +- fs/fat/fat.c | 16 ++++++++-------- fs/fat/file.c | 4 ++-- fs/fdos/dev.c | 2 +- fs/fdos/fat.c | 2 +- fs/fdos/fdos.c | 2 +- fs/fdos/fs.c | 2 +- fs/fdos/subdir.c | 2 +- fs/fdos/vfat.c | 2 +- fs/jffs2/compr_lzari.c | 4 ++-- fs/jffs2/compr_lzo.c | 4 ++-- fs/jffs2/compr_rtime.c | 2 +- fs/jffs2/compr_rubin.c | 2 +- fs/jffs2/compr_zlib.c | 2 +- fs/jffs2/jffs2_1pass.c | 20 ++++++++++---------- fs/jffs2/jffs2_nand_1pass.c | 2 +- fs/jffs2/mini_inflate.c | 2 +- fs/reiserfs/dev.c | 2 +- fs/reiserfs/mode_string.c | 2 +- fs/reiserfs/reiserfs.c | 2 +- 23 files changed, 42 insertions(+), 42 deletions(-) (limited to 'fs') diff --git a/fs/cramfs/cramfs.c b/fs/cramfs/cramfs.c index 37d0cbad9a..369d1f1674 100644 --- a/fs/cramfs/cramfs.c +++ b/fs/cramfs/cramfs.c @@ -27,7 +27,7 @@ #include #include -#if (CONFIG_COMMANDS & CFG_CMD_JFFS2) || defined(CONFIG_CMD_JFFS2) +#if defined(CONFIG_CMD_JFFS2) #include #include diff --git a/fs/cramfs/uncompress.c b/fs/cramfs/uncompress.c index 18d1f0f531..2e906eb4cf 100644 --- a/fs/cramfs/uncompress.c +++ b/fs/cramfs/uncompress.c @@ -25,7 +25,7 @@ #include #include -#if (CONFIG_COMMANDS & CFG_CMD_JFFS2) || defined(CONFIG_CMD_JFFS2) +#if defined(CONFIG_CMD_JFFS2) static z_stream stream; diff --git a/fs/ext2/dev.c b/fs/ext2/dev.c index 3904e812ff..49a55b90e2 100644 --- a/fs/ext2/dev.c +++ b/fs/ext2/dev.c @@ -25,7 +25,7 @@ #include -#if (CONFIG_COMMANDS & CFG_CMD_EXT2) || defined(CONFIG_CMD_EXT2) +#if defined(CONFIG_CMD_EXT2) #include #include diff --git a/fs/ext2/ext2fs.c b/fs/ext2/ext2fs.c index 6caae3551a..e65e39b5ab 100644 --- a/fs/ext2/ext2fs.c +++ b/fs/ext2/ext2fs.c @@ -25,7 +25,7 @@ #include -#if (CONFIG_COMMANDS & CFG_CMD_EXT2) || defined(CONFIG_CMD_EXT2) +#if defined(CONFIG_CMD_EXT2) #include #include #include diff --git a/fs/fat/fat.c b/fs/fat/fat.c index fd9358829a..3824e1d3d1 100644 --- a/fs/fat/fat.c +++ b/fs/fat/fat.c @@ -31,7 +31,7 @@ #include #include -#if (CONFIG_COMMANDS & CFG_CMD_FAT) || defined(CONFIG_CMD_FAT) +#if defined(CONFIG_CMD_FAT) /* * Convert a string to lowercase. @@ -90,9 +90,9 @@ fat_register_device(block_dev_desc_t *dev_desc, int part_no) part_offset=0; } else { -#if ((CONFIG_COMMANDS & CFG_CMD_IDE) || defined(CONFIG_CMD_IDE) || \ - (CONFIG_COMMANDS & CFG_CMD_SCSI) || defined(CONFIG_CMD_SCSI) || \ - (CONFIG_COMMANDS & CFG_CMD_USB) || defined(CONFIG_CMD_USB) || \ +#if (defined(CONFIG_CMD_IDE) || \ + defined(CONFIG_CMD_SCSI) || \ + defined(CONFIG_CMD_USB) || \ (defined(CONFIG_MMC) && defined(CONFIG_LPC2292)) || \ defined(CONFIG_SYSTEMACE) ) disk_partition_t info; @@ -975,9 +975,9 @@ file_fat_detectfs(void) printf("No current device\n"); return 1; } -#if (CONFIG_COMMANDS & CFG_CMD_IDE) || defined(CONFIG_CMD_IDE) || \ - (CONFIG_COMMANDS & CFG_CMD_SCSI) || defined(CONFIG_CMD_SCSI) || \ - (CONFIG_COMMANDS & CFG_CMD_USB) || defined(CONFIG_CMD_USB) || \ +#if defined(CONFIG_CMD_IDE) || \ + defined(CONFIG_CMD_SCSI) || \ + defined(CONFIG_CMD_USB) || \ (CONFIG_MMC) printf("Interface: "); switch(cur_dev->if_type) { @@ -1019,4 +1019,4 @@ file_fat_read(const char *filename, void *buffer, unsigned long maxsize) return do_fat_read(filename, buffer, maxsize, LS_NO); } -#endif /* #if (CONFIG_COMMANDS & CFG_CMD_FAT) */ +#endif diff --git a/fs/fat/file.c b/fs/fat/file.c index 34d046163b..514dbaecba 100644 --- a/fs/fat/file.c +++ b/fs/fat/file.c @@ -32,7 +32,7 @@ #include #include -#if (CONFIG_COMMANDS & CFG_CMD_FAT) || defined(CONFIG_CMD_FAT) +#if defined(CONFIG_CMD_FAT) /* Supported filesystems */ static const struct filesystem filesystems[] = { @@ -205,4 +205,4 @@ file_read(const char *filename, void *buffer, unsigned long maxsize) return filesystems[current_filesystem].read(arg, buffer, maxsize); } -#endif /* #if (CONFIG_COMMANDS & CFG_CMD_FAT) */ +#endif diff --git a/fs/fdos/dev.c b/fs/fdos/dev.c index 334d07366d..271d0e790b 100644 --- a/fs/fdos/dev.c +++ b/fs/fdos/dev.c @@ -28,7 +28,7 @@ #include "dos.h" #include "fdos.h" -#if (CONFIG_COMMANDS & CFG_CMD_FDOS) || defined(CONFIG_CMD_FDOS) +#if defined(CONFIG_CMD_FDOS) #define NB_HEADS 2 #define NB_TRACKS 80 diff --git a/fs/fdos/fat.c b/fs/fdos/fat.c index 7f26e2e22f..2e2d2b8cef 100644 --- a/fs/fdos/fat.c +++ b/fs/fdos/fat.c @@ -26,7 +26,7 @@ #include #include -#if (CONFIG_COMMANDS & CFG_CMD_FDOS) || defined(CONFIG_CMD_FDOS) +#if defined(CONFIG_CMD_FDOS) #include "dos.h" #include "fdos.h" diff --git a/fs/fdos/fdos.c b/fs/fdos/fdos.c index 5cae2e151e..5be6a960e7 100644 --- a/fs/fdos/fdos.c +++ b/fs/fdos/fdos.c @@ -25,7 +25,7 @@ #include #include -#if (CONFIG_COMMANDS & CFG_CMD_FDOS) || defined(CONFIG_CMD_FDOS) +#if defined(CONFIG_CMD_FDOS) #include #include "dos.h" #include "fdos.h" diff --git a/fs/fdos/fs.c b/fs/fdos/fs.c index 0fcf1a775a..aded6708d1 100644 --- a/fs/fdos/fs.c +++ b/fs/fdos/fs.c @@ -26,7 +26,7 @@ #include #include -#if (CONFIG_COMMANDS & CFG_CMD_FDOS) || defined(CONFIG_CMD_FDOS) +#if defined(CONFIG_CMD_FDOS) #include "dos.h" #include "fdos.h" diff --git a/fs/fdos/subdir.c b/fs/fdos/subdir.c index deaccf159f..497f554f91 100644 --- a/fs/fdos/subdir.c +++ b/fs/fdos/subdir.c @@ -26,7 +26,7 @@ #include #include -#if (CONFIG_COMMANDS & CFG_CMD_FDOS) || defined(CONFIG_CMD_FDOS) +#if defined(CONFIG_CMD_FDOS) #include "dos.h" #include "fdos.h" diff --git a/fs/fdos/vfat.c b/fs/fdos/vfat.c index 31028df130..0e7883b0ab 100644 --- a/fs/fdos/vfat.c +++ b/fs/fdos/vfat.c @@ -25,7 +25,7 @@ #include #include -#if (CONFIG_COMMANDS & CFG_CMD_FDOS) || defined(CONFIG_CMD_FDOS) +#if defined(CONFIG_CMD_FDOS) #include #include "dos.h" diff --git a/fs/jffs2/compr_lzari.c b/fs/jffs2/compr_lzari.c index a94f9ff657..f64bc74a9e 100644 --- a/fs/jffs2/compr_lzari.c +++ b/fs/jffs2/compr_lzari.c @@ -50,7 +50,7 @@ All rights reserved. Permission granted for non-commercial use. #include -#if ((CONFIG_COMMANDS & CFG_CMD_JFFS2) || defined(CONFIG_CMD_JFFS2)) && defined(CONFIG_JFFS2_LZO_LZARI) +#if defined(CONFIG_CMD_JFFS2) && defined(CONFIG_JFFS2_LZO_LZARI) #include #include @@ -259,4 +259,4 @@ int lzari_decompress(unsigned char *data_in, unsigned char *cpage_out, { return Decode(data_in, cpage_out, srclen, destlen); } -#endif /* ((CONFIG_COMMANDS & CFG_CMD_JFFS2) && defined(CONFIG_JFFS2_LZO_LZARI)) */ +#endif diff --git a/fs/jffs2/compr_lzo.c b/fs/jffs2/compr_lzo.c index 7c71730070..a32b9934e4 100644 --- a/fs/jffs2/compr_lzo.c +++ b/fs/jffs2/compr_lzo.c @@ -67,7 +67,7 @@ #include -#if ((CONFIG_COMMANDS & CFG_CMD_JFFS2) || defined(CONFIG_CMD_JFFS2)) && defined(CONFIG_JFFS2_LZO_LZARI) +#if defined(CONFIG_CMD_JFFS2) && defined(CONFIG_JFFS2_LZO_LZARI) #include #include @@ -402,4 +402,4 @@ int lzo_decompress(unsigned char *data_in, unsigned char *cpage_out, return lzo1x_decompress (data_in, srclen, cpage_out, &outlen, NULL); } -#endif /* ((CONFIG_COMMANDS & CFG_CMD_JFFS2) && defined(CONFIG_JFFS2_LZO_LZARI)) */ +#endif diff --git a/fs/jffs2/compr_rtime.c b/fs/jffs2/compr_rtime.c index adb84a4ed9..cb132118ae 100644 --- a/fs/jffs2/compr_rtime.c +++ b/fs/jffs2/compr_rtime.c @@ -46,7 +46,7 @@ */ #include -#if (CONFIG_COMMANDS & CFG_CMD_JFFS2) || defined(CONFIG_CMD_JFFS2) +#if defined(CONFIG_CMD_JFFS2) #include diff --git a/fs/jffs2/compr_rubin.c b/fs/jffs2/compr_rubin.c index b93977c054..7a612c9192 100644 --- a/fs/jffs2/compr_rubin.c +++ b/fs/jffs2/compr_rubin.c @@ -39,7 +39,7 @@ */ #include -#if (CONFIG_COMMANDS & CFG_CMD_JFFS2) || defined(CONFIG_CMD_JFFS2) +#if defined(CONFIG_CMD_JFFS2) #include #include diff --git a/fs/jffs2/compr_zlib.c b/fs/jffs2/compr_zlib.c index b85a86e47a..78b12a34a4 100644 --- a/fs/jffs2/compr_zlib.c +++ b/fs/jffs2/compr_zlib.c @@ -37,7 +37,7 @@ #include #include -#if (CONFIG_COMMANDS & CFG_CMD_JFFS2) || defined(CONFIG_CMD_JFFS2) +#if defined(CONFIG_CMD_JFFS2) #include #include diff --git a/fs/jffs2/jffs2_1pass.c b/fs/jffs2/jffs2_1pass.c index af2a8e2806..0d6d673164 100644 --- a/fs/jffs2/jffs2_1pass.c +++ b/fs/jffs2/jffs2_1pass.c @@ -117,7 +117,7 @@ #include #include -#if (CONFIG_COMMANDS & CFG_CMD_JFFS2) || defined(CONFIG_CMD_JFFS2) +#if defined(CONFIG_CMD_JFFS2) #include #include @@ -144,7 +144,7 @@ static struct part_info *current_part; #if (defined(CONFIG_JFFS2_NAND) && \ - ((CONFIG_COMMANDS & CFG_CMD_NAND) || defined(CONFIG_CMD_NAND)) ) + defined(CONFIG_CMD_NAND) ) #if defined(CFG_NAND_LEGACY) #include #else @@ -275,10 +275,10 @@ static void put_fl_mem_nand(void *buf) { free(buf); } -#endif /* #if defined(CONFIG_JFFS2_NAND) && (CONFIG_COMMANDS & CFG_CMD_NAND) */ +#endif -#if (CONFIG_COMMANDS & CFG_CMD_FLASH) || defined(CONFIG_CMD_FLASH) +#if defined(CONFIG_CMD_FLASH) /* * Support for jffs2 on top of NOR-flash * @@ -301,7 +301,7 @@ static inline void *get_node_mem_nor(u32 off) { return (void*)get_fl_mem_nor(off); } -#endif /* #if (CONFIG_COMMANDS & CFG_CMD_FLASH) */ +#endif /* @@ -312,12 +312,12 @@ static inline void *get_fl_mem(u32 off, u32 size, void *ext_buf) { struct mtdids *id = current_part->dev->id; -#if (CONFIG_COMMANDS & CFG_CMD_FLASH) || defined(CONFIG_CMD_FLASH) +#if defined(CONFIG_CMD_FLASH) if (id->type == MTD_DEV_TYPE_NOR) return get_fl_mem_nor(off); #endif -#if defined(CONFIG_JFFS2_NAND) && ((CONFIG_COMMANDS & CFG_CMD_NAND) || defined(CONFIG_CMD_NAND)) +#if defined(CONFIG_JFFS2_NAND) && defined(CONFIG_CMD_NAND) if (id->type == MTD_DEV_TYPE_NAND) return get_fl_mem_nand(off, size, ext_buf); #endif @@ -330,13 +330,13 @@ static inline void *get_node_mem(u32 off) { struct mtdids *id = current_part->dev->id; -#if (CONFIG_COMMANDS & CFG_CMD_FLASH) || defined(CONFIG_CMD_FLASH) +#if defined(CONFIG_CMD_FLASH) if (id->type == MTD_DEV_TYPE_NOR) return get_node_mem_nor(off); #endif #if defined(CONFIG_JFFS2_NAND) && \ - (CONFIG_COMMANDS & CFG_CMD_NAND) || defined(CONFIG_CMD_NAND) + defined(CONFIG_CMD_NAND) if (id->type == MTD_DEV_TYPE_NAND) return get_node_mem_nand(off); #endif @@ -348,7 +348,7 @@ static inline void *get_node_mem(u32 off) static inline void put_fl_mem(void *buf) { #if defined(CONFIG_JFFS2_NAND) && \ - (CONFIG_COMMANDS & CFG_CMD_NAND) || defined(CONFIG_CMD_NAND) + defined(CONFIG_CMD_NAND) struct mtdids *id = current_part->dev->id; if (id->type == MTD_DEV_TYPE_NAND) diff --git a/fs/jffs2/jffs2_nand_1pass.c b/fs/jffs2/jffs2_nand_1pass.c index b9cdcbfa56..08885f08a7 100644 --- a/fs/jffs2/jffs2_nand_1pass.c +++ b/fs/jffs2/jffs2_nand_1pass.c @@ -1,6 +1,6 @@ #include -#if !defined(CFG_NAND_LEGACY) && ((CONFIG_COMMANDS & CFG_CMD_JFFS2) || defined(CONFIG_CMD_JFFS2)) +#if !defined(CFG_NAND_LEGACY) && defined(CONFIG_CMD_JFFS2) #include #include diff --git a/fs/jffs2/mini_inflate.c b/fs/jffs2/mini_inflate.c index 568c292749..f2b8762856 100644 --- a/fs/jffs2/mini_inflate.c +++ b/fs/jffs2/mini_inflate.c @@ -25,7 +25,7 @@ #include -#if (CONFIG_COMMANDS & CFG_CMD_JFFS2) || defined(CONFIG_CMD_JFFS2) +#if defined(CONFIG_CMD_JFFS2) #include diff --git a/fs/reiserfs/dev.c b/fs/reiserfs/dev.c index 6f7c9d263b..66f927c642 100644 --- a/fs/reiserfs/dev.c +++ b/fs/reiserfs/dev.c @@ -19,7 +19,7 @@ #include -#if (CONFIG_COMMANDS & CFG_CMD_REISER) || defined(CONFIG_CMD_REISER) +#if defined(CONFIG_CMD_REISER) #include #include diff --git a/fs/reiserfs/mode_string.c b/fs/reiserfs/mode_string.c index 9c460347da..8bf6bf0e94 100644 --- a/fs/reiserfs/mode_string.c +++ b/fs/reiserfs/mode_string.c @@ -26,7 +26,7 @@ #include -#if (CONFIG_COMMANDS & CFG_CMD_REISER) || defined(CONFIG_CMD_REISER) +#if defined(CONFIG_CMD_REISER) #include #if ( S_ISUID != 04000 ) || ( S_ISGID != 02000 ) || ( S_ISVTX != 01000 ) \ diff --git a/fs/reiserfs/reiserfs.c b/fs/reiserfs/reiserfs.c index d9ee2cd97f..c6ab22647a 100644 --- a/fs/reiserfs/reiserfs.c +++ b/fs/reiserfs/reiserfs.c @@ -29,7 +29,7 @@ */ #include -#if (CONFIG_COMMANDS & CFG_CMD_REISER) || defined(CONFIG_CMD_REISER) +#if defined(CONFIG_CMD_REISER) #include #include -- cgit v1.2.3 From f40a7f3e3888b42a43674b099e5470022c8c544c Mon Sep 17 00:00:00 2001 From: Jon Loeliger Date: Tue, 10 Jul 2007 11:07:56 -0500 Subject: fs/: Remove lingering references to CFG_CMD_* symbols. Fixed some broken instances of "#ifdef CMD_CFG_IDE" too. Those always evaluated TRUE, and thus were always compiled even when IDE really wasn't defined/wanted. Signed-off-by: Jon Loeliger --- fs/ext2/dev.c | 2 +- fs/ext2/ext2fs.c | 2 +- fs/jffs2/compr_rtime.c | 2 +- fs/jffs2/compr_rubin.c | 2 +- fs/jffs2/compr_zlib.c | 2 +- fs/jffs2/jffs2_1pass.c | 2 +- fs/jffs2/jffs2_nand_1pass.c | 2 +- fs/jffs2/mini_inflate.c | 2 +- fs/reiserfs/dev.c | 2 +- fs/reiserfs/mode_string.c | 2 +- fs/reiserfs/reiserfs.c | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) (limited to 'fs') diff --git a/fs/ext2/dev.c b/fs/ext2/dev.c index 49a55b90e2..643a1a8c85 100644 --- a/fs/ext2/dev.c +++ b/fs/ext2/dev.c @@ -123,4 +123,4 @@ int ext2fs_devread (int sector, int byte_offset, int byte_len, char *buf) { } return (1); } -#endif /* CFG_CMD_EXT2FS */ +#endif diff --git a/fs/ext2/ext2fs.c b/fs/ext2/ext2fs.c index e65e39b5ab..513a2f9e32 100644 --- a/fs/ext2/ext2fs.c +++ b/fs/ext2/ext2fs.c @@ -875,4 +875,4 @@ fail: return (0); } -#endif /* CFG_CMD_EXT2FS */ +#endif diff --git a/fs/jffs2/compr_rtime.c b/fs/jffs2/compr_rtime.c index cb132118ae..144263c422 100644 --- a/fs/jffs2/compr_rtime.c +++ b/fs/jffs2/compr_rtime.c @@ -88,4 +88,4 @@ void rtime_decompress(unsigned char *data_in, unsigned char *cpage_out, } } -#endif /* CFG_CMD_JFFS2 */ +#endif diff --git a/fs/jffs2/compr_rubin.c b/fs/jffs2/compr_rubin.c index 7a612c9192..f6f3fa1b58 100644 --- a/fs/jffs2/compr_rubin.c +++ b/fs/jffs2/compr_rubin.c @@ -123,4 +123,4 @@ void dynrubin_decompress(unsigned char *data_in, unsigned char *cpage_out, rubin_do_decompress(bits, data_in+8, cpage_out, dstlen); } -#endif /* CFG_CMD_JFFS2 */ +#endif diff --git a/fs/jffs2/compr_zlib.c b/fs/jffs2/compr_zlib.c index 78b12a34a4..29dfe1b664 100644 --- a/fs/jffs2/compr_zlib.c +++ b/fs/jffs2/compr_zlib.c @@ -49,4 +49,4 @@ long zlib_decompress(unsigned char *data_in, unsigned char *cpage_out, } -#endif /* CFG_CMD_JFFS2 */ +#endif diff --git a/fs/jffs2/jffs2_1pass.c b/fs/jffs2/jffs2_1pass.c index 0d6d673164..53166683fd 100644 --- a/fs/jffs2/jffs2_1pass.c +++ b/fs/jffs2/jffs2_1pass.c @@ -1397,4 +1397,4 @@ jffs2_1pass_info(struct part_info * part) return 1; } -#endif /* CFG_CMD_JFFS2 */ +#endif diff --git a/fs/jffs2/jffs2_nand_1pass.c b/fs/jffs2/jffs2_nand_1pass.c index 08885f08a7..3a4c64985a 100644 --- a/fs/jffs2/jffs2_nand_1pass.c +++ b/fs/jffs2/jffs2_nand_1pass.c @@ -1033,4 +1033,4 @@ jffs2_1pass_info(struct part_info * part) return 1; } -#endif /* CFG_CMD_JFFS2 */ +#endif diff --git a/fs/jffs2/mini_inflate.c b/fs/jffs2/mini_inflate.c index f2b8762856..4c50fc32dc 100644 --- a/fs/jffs2/mini_inflate.c +++ b/fs/jffs2/mini_inflate.c @@ -393,4 +393,4 @@ long decompress_block(unsigned char *dest, unsigned char *source, return stream.error ? -stream.error : stream.decoded; } -#endif /* CFG_CMD_JFFS2 */ +#endif diff --git a/fs/reiserfs/dev.c b/fs/reiserfs/dev.c index 66f927c642..6b36c06b5c 100644 --- a/fs/reiserfs/dev.c +++ b/fs/reiserfs/dev.c @@ -120,4 +120,4 @@ int reiserfs_devread (int sector, int byte_offset, int byte_len, char *buf) return 1; } -#endif /* CFG_CMD_REISERFS */ +#endif diff --git a/fs/reiserfs/mode_string.c b/fs/reiserfs/mode_string.c index 8bf6bf0e94..ae98834df4 100644 --- a/fs/reiserfs/mode_string.c +++ b/fs/reiserfs/mode_string.c @@ -139,4 +139,4 @@ const char *bb_mode_string(int mode) #endif -#endif /* CFG_CMD_REISER */ +#endif diff --git a/fs/reiserfs/reiserfs.c b/fs/reiserfs/reiserfs.c index c6ab22647a..aa96361638 100644 --- a/fs/reiserfs/reiserfs.c +++ b/fs/reiserfs/reiserfs.c @@ -983,4 +983,4 @@ reiserfs_open (char *filename) return filemax; } -#endif /* CFG_CMD_REISER */ +#endif -- cgit v1.2.3 From bf1060ea4f9eaa7e7d164a70a7d6f28939882053 Mon Sep 17 00:00:00 2001 From: Wolfgang Denk Date: Tue, 7 Aug 2007 16:02:13 +0200 Subject: Fix missing brace error in fs/fat/fat.c [pointed out by Roderik Wildenburg] Signed-off-by: Wolfgang Denk --- fs/fat/fat.c | 57 +++++++++++++++++++++++++++++---------------------------- 1 file changed, 29 insertions(+), 28 deletions(-) (limited to 'fs') diff --git a/fs/fat/fat.c b/fs/fat/fat.c index c068a842e8..e98e50ae77 100644 --- a/fs/fat/fat.c +++ b/fs/fat/fat.c @@ -89,41 +89,42 @@ fat_register_device(block_dev_desc_t *dev_desc, int part_no) /* ok, we assume we are on a PBR only */ cur_part = 1; part_offset=0; - } - else { + } else { #if (defined(CONFIG_CMD_IDE) || \ defined(CONFIG_CMD_SCSI) || \ defined(CONFIG_CMD_USB) || \ (defined(CONFIG_MMC) && defined(CONFIG_LPC2292)) || \ defined(CONFIG_SYSTEMACE) ) - /* First we assume, there is a MBR */ - if (!get_partition_info (dev_desc, part_no, &info)) { - part_offset = info.start; - cur_part = part_no; - } else if (!strncmp((char *)&buffer[DOS_FS_TYPE_OFFSET], "FAT", 3)) { - /* ok, we assume we are on a PBR only */ - cur_part = 1; - part_offset = 0; - } else { - printf ("** Partition %d not valid on device %d **\n", part_no, dev_desc->dev); - return -1; - } + /* First we assume, there is a MBR */ + if (!get_partition_info (dev_desc, part_no, &info)) { + part_offset = info.start; + cur_part = part_no; + } else if (!strncmp((char *)&buffer[DOS_FS_TYPE_OFFSET], "FAT", 3)) { + /* ok, we assume we are on a PBR only */ + cur_part = 1; + part_offset = 0; + } else { + printf ("** Partition %d not valid on device %d **\n", + part_no, dev_desc->dev); + return -1; + } #else - if(!strncmp((char *)&buffer[DOS_FS_TYPE_OFFSET],"FAT",3)) { - /* ok, we assume we are on a PBR only */ - cur_part = 1; - part_offset = 0; - info.start = part_offset; - } else { - /* FIXME we need to determine the start block of the - * partition where the DOS FS resides. This can be done - * by using the get_partition_info routine. For this - * purpose the libpart must be included. - */ - part_offset = 32; - cur_part = 1; - } + if(!strncmp((char *)&buffer[DOS_FS_TYPE_OFFSET],"FAT",3)) { + /* ok, we assume we are on a PBR only */ + cur_part = 1; + part_offset = 0; + info.start = part_offset; + } else { + /* FIXME we need to determine the start block of the + * partition where the DOS FS resides. This can be done + * by using the get_partition_info routine. For this + * purpose the libpart must be included. + */ + part_offset = 32; + cur_part = 1; + } #endif + } return 0; } -- cgit v1.2.3