diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/cramfs/cramfs.c | 2 | ||||
-rw-r--r-- | fs/cramfs/uncompress.c | 2 | ||||
-rw-r--r-- | fs/ext2/dev.c | 4 | ||||
-rw-r--r-- | fs/ext2/ext2fs.c | 4 | ||||
-rw-r--r--[-rwxr-xr-x] | fs/fat/fat.c | 24 | ||||
-rw-r--r-- | fs/fat/file.c | 4 | ||||
-rw-r--r-- | fs/fdos/dev.c | 2 | ||||
-rw-r--r-- | fs/fdos/fat.c | 2 | ||||
-rw-r--r-- | fs/fdos/fdos.c | 2 | ||||
-rw-r--r-- | fs/fdos/fs.c | 2 | ||||
-rw-r--r-- | fs/fdos/subdir.c | 2 | ||||
-rw-r--r-- | fs/fdos/vfat.c | 2 | ||||
-rw-r--r-- | fs/jffs2/compr_lzari.c | 4 | ||||
-rw-r--r-- | fs/jffs2/compr_lzo.c | 4 | ||||
-rw-r--r-- | fs/jffs2/compr_rtime.c | 4 | ||||
-rw-r--r-- | fs/jffs2/compr_rubin.c | 4 | ||||
-rw-r--r-- | fs/jffs2/compr_zlib.c | 4 | ||||
-rw-r--r-- | fs/jffs2/jffs2_1pass.c | 25 | ||||
-rw-r--r-- | fs/jffs2/jffs2_nand_1pass.c | 4 | ||||
-rw-r--r-- | fs/jffs2/mini_inflate.c | 4 | ||||
-rw-r--r-- | fs/reiserfs/dev.c | 4 | ||||
-rw-r--r-- | fs/reiserfs/mode_string.c | 4 | ||||
-rw-r--r-- | fs/reiserfs/reiserfs.c | 4 |
23 files changed, 64 insertions, 53 deletions
diff --git a/fs/cramfs/cramfs.c b/fs/cramfs/cramfs.c index 48e7f63aa4d..369d1f16740 100644 --- a/fs/cramfs/cramfs.c +++ b/fs/cramfs/cramfs.c @@ -27,7 +27,7 @@ #include <common.h> #include <malloc.h> -#if (CONFIG_COMMANDS & CFG_CMD_JFFS2) +#if defined(CONFIG_CMD_JFFS2) #include <asm/byteorder.h> #include <linux/stat.h> diff --git a/fs/cramfs/uncompress.c b/fs/cramfs/uncompress.c index 170832a9c53..2e906eb4cfa 100644 --- a/fs/cramfs/uncompress.c +++ b/fs/cramfs/uncompress.c @@ -25,7 +25,7 @@ #include <watchdog.h> #include <zlib.h> -#if (CONFIG_COMMANDS & CFG_CMD_JFFS2) +#if defined(CONFIG_CMD_JFFS2) static z_stream stream; diff --git a/fs/ext2/dev.c b/fs/ext2/dev.c index 1469e982b74..643a1a8c850 100644 --- a/fs/ext2/dev.c +++ b/fs/ext2/dev.c @@ -25,7 +25,7 @@ #include <common.h> -#if (CONFIG_COMMANDS & CFG_CMD_EXT2) +#if defined(CONFIG_CMD_EXT2) #include <config.h> #include <ext2fs.h> @@ -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 9cf2fb7ba49..513a2f9e320 100644 --- a/fs/ext2/ext2fs.c +++ b/fs/ext2/ext2fs.c @@ -25,7 +25,7 @@ #include <common.h> -#if (CONFIG_COMMANDS & CFG_CMD_EXT2) +#if defined(CONFIG_CMD_EXT2) #include <ext2fs.h> #include <malloc.h> #include <asm/byteorder.h> @@ -875,4 +875,4 @@ fail: return (0); } -#endif /* CFG_CMD_EXT2FS */ +#endif diff --git a/fs/fat/fat.c b/fs/fat/fat.c index 21a00b80d41..c068a842e8f 100755..100644 --- a/fs/fat/fat.c +++ b/fs/fat/fat.c @@ -31,7 +31,7 @@ #include <asm/byteorder.h> #include <part.h> -#if (CONFIG_COMMANDS & CFG_CMD_FAT) +#if defined(CONFIG_CMD_FAT) /* * Convert a string to lowercase. @@ -85,10 +85,16 @@ fat_register_device(block_dev_desc_t *dev_desc, int part_no) /* no signature found */ return -1; } -#if ((CONFIG_COMMANDS & CFG_CMD_IDE) || \ - (CONFIG_COMMANDS & CFG_CMD_SCSI) || \ - (CONFIG_COMMANDS & CFG_CMD_USB) || \ - (defined(CONFIG_MMC)) || \ + 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 { +#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)) { @@ -979,8 +985,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 defined(CONFIG_CMD_IDE) || \ + defined(CONFIG_CMD_SCSI) || \ + defined(CONFIG_CMD_USB) || \ + (CONFIG_MMC) printf("Interface: "); switch(cur_dev->if_type) { case IF_TYPE_IDE : printf("IDE"); break; @@ -1021,4 +1029,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 f999ac5a254..514dbaecba8 100644 --- a/fs/fat/file.c +++ b/fs/fat/file.c @@ -32,7 +32,7 @@ #include <linux/stat.h> #include <linux/time.h> -#if (CONFIG_COMMANDS & CFG_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 5dea5cd7880..271d0e790b7 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 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 2ef2371e17f..2e2d2b8cefb 100644 --- a/fs/fdos/fat.c +++ b/fs/fdos/fat.c @@ -26,7 +26,7 @@ #include <config.h> #include <malloc.h> -#if (CONFIG_COMMANDS & CFG_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 a29f43d9788..5be6a960e7a 100644 --- a/fs/fdos/fdos.c +++ b/fs/fdos/fdos.c @@ -25,7 +25,7 @@ #include <common.h> #include <config.h> -#if (CONFIG_COMMANDS & CFG_CMD_FDOS) +#if defined(CONFIG_CMD_FDOS) #include <malloc.h> #include "dos.h" #include "fdos.h" diff --git a/fs/fdos/fs.c b/fs/fdos/fs.c index 3b9d09e4903..aded6708d1f 100644 --- a/fs/fdos/fs.c +++ b/fs/fdos/fs.c @@ -26,7 +26,7 @@ #include <config.h> #include <malloc.h> -#if (CONFIG_COMMANDS & CFG_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 97b25047ae4..497f554f915 100644 --- a/fs/fdos/subdir.c +++ b/fs/fdos/subdir.c @@ -26,7 +26,7 @@ #include <config.h> #include <malloc.h> -#if (CONFIG_COMMANDS & CFG_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 46a464b293f..0e7883b0ab3 100644 --- a/fs/fdos/vfat.c +++ b/fs/fdos/vfat.c @@ -25,7 +25,7 @@ #include <common.h> #include <config.h> -#if (CONFIG_COMMANDS & CFG_CMD_FDOS) +#if defined(CONFIG_CMD_FDOS) #include <linux/ctype.h> #include "dos.h" diff --git a/fs/jffs2/compr_lzari.c b/fs/jffs2/compr_lzari.c index 828b6e5515b..f64bc74a9ee 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 <config.h> -#if ((CONFIG_COMMANDS & CFG_CMD_JFFS2) && defined(CONFIG_JFFS2_LZO_LZARI)) +#if defined(CONFIG_CMD_JFFS2) && defined(CONFIG_JFFS2_LZO_LZARI) #include <linux/stddef.h> #include <jffs2/jffs2.h> @@ -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 b6c590ac8f3..a32b9934e4f 100644 --- a/fs/jffs2/compr_lzo.c +++ b/fs/jffs2/compr_lzo.c @@ -67,7 +67,7 @@ #include <config.h> -#if ((CONFIG_COMMANDS & CFG_CMD_JFFS2) && defined(CONFIG_JFFS2_LZO_LZARI)) +#if defined(CONFIG_CMD_JFFS2) && defined(CONFIG_JFFS2_LZO_LZARI) #include <linux/stddef.h> #include <jffs2/jffs2.h> @@ -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 9bb4f1bcb63..144263c4225 100644 --- a/fs/jffs2/compr_rtime.c +++ b/fs/jffs2/compr_rtime.c @@ -46,7 +46,7 @@ */ #include <config.h> -#if (CONFIG_COMMANDS & CFG_CMD_JFFS2) +#if defined(CONFIG_CMD_JFFS2) #include <jffs2/jffs2.h> @@ -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 74577d9c62b..f6f3fa1b588 100644 --- a/fs/jffs2/compr_rubin.c +++ b/fs/jffs2/compr_rubin.c @@ -39,7 +39,7 @@ */ #include <config.h> -#if (CONFIG_COMMANDS & CFG_CMD_JFFS2) +#if defined(CONFIG_CMD_JFFS2) #include <jffs2/jffs2.h> #include <jffs2/compr_rubin.h> @@ -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 d88d0f8f36e..29dfe1b6640 100644 --- a/fs/jffs2/compr_zlib.c +++ b/fs/jffs2/compr_zlib.c @@ -37,7 +37,7 @@ #include <common.h> #include <config.h> -#if (CONFIG_COMMANDS & CFG_CMD_JFFS2) +#if defined(CONFIG_CMD_JFFS2) #include <jffs2/jffs2.h> #include <jffs2/mini_inflate.h> @@ -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 41ff4c1fbbd..53166683fd0 100644 --- a/fs/jffs2/jffs2_1pass.c +++ b/fs/jffs2/jffs2_1pass.c @@ -117,7 +117,7 @@ #include <linux/stat.h> #include <linux/time.h> -#if (CONFIG_COMMANDS & CFG_CMD_JFFS2) +#if defined(CONFIG_CMD_JFFS2) #include <jffs2/jffs2.h> #include <jffs2/jffs2_1pass.h> @@ -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) +#if (defined(CONFIG_JFFS2_NAND) && \ + defined(CONFIG_CMD_NAND) ) #if defined(CFG_NAND_LEGACY) #include <linux/mtd/nand_legacy.h> #else @@ -274,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) +#if defined(CONFIG_CMD_FLASH) /* * Support for jffs2 on top of NOR-flash * @@ -300,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 /* @@ -311,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) +#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) +#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 @@ -329,12 +330,13 @@ static inline void *get_node_mem(u32 off) { struct mtdids *id = current_part->dev->id; -#if (CONFIG_COMMANDS & CFG_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) +#if defined(CONFIG_JFFS2_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) +#if defined(CONFIG_JFFS2_NAND) && \ + defined(CONFIG_CMD_NAND) struct mtdids *id = current_part->dev->id; if (id->type == MTD_DEV_TYPE_NAND) @@ -1394,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 e78af7578b6..3a4c64985a4 100644 --- a/fs/jffs2/jffs2_nand_1pass.c +++ b/fs/jffs2/jffs2_nand_1pass.c @@ -1,6 +1,6 @@ #include <common.h> -#if !defined(CFG_NAND_LEGACY) && (CONFIG_COMMANDS & CFG_CMD_JFFS2) +#if !defined(CFG_NAND_LEGACY) && defined(CONFIG_CMD_JFFS2) #include <malloc.h> #include <linux/stat.h> @@ -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 4f511ec1a47..4c50fc32dc2 100644 --- a/fs/jffs2/mini_inflate.c +++ b/fs/jffs2/mini_inflate.c @@ -25,7 +25,7 @@ #include <config.h> -#if (CONFIG_COMMANDS & CFG_CMD_JFFS2) +#if defined(CONFIG_CMD_JFFS2) #include <jffs2/mini_inflate.h> @@ -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 6f6056f3377..6b36c06b5c1 100644 --- a/fs/reiserfs/dev.c +++ b/fs/reiserfs/dev.c @@ -19,7 +19,7 @@ #include <common.h> -#if (CONFIG_COMMANDS & CFG_CMD_REISER) +#if defined(CONFIG_CMD_REISER) #include <config.h> #include <reiserfs.h> @@ -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 bc565fbddd2..ae98834df48 100644 --- a/fs/reiserfs/mode_string.c +++ b/fs/reiserfs/mode_string.c @@ -26,7 +26,7 @@ #include <common.h> -#if (CONFIG_COMMANDS & CFG_CMD_REISER) +#if defined(CONFIG_CMD_REISER) #include <linux/stat.h> #if ( S_ISUID != 04000 ) || ( S_ISGID != 02000 ) || ( S_ISVTX != 01000 ) \ @@ -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 31c25ebc7b1..aa96361638e 100644 --- a/fs/reiserfs/reiserfs.c +++ b/fs/reiserfs/reiserfs.c @@ -29,7 +29,7 @@ */ #include <common.h> -#if (CONFIG_COMMANDS & CFG_CMD_REISER) +#if defined(CONFIG_CMD_REISER) #include <malloc.h> #include <linux/ctype.h> @@ -983,4 +983,4 @@ reiserfs_open (char *filename) return filemax; } -#endif /* CFG_CMD_REISER */ +#endif |