]> git.sur5r.net Git - u-boot/blobdiff - fs/ext2/ext2fs.c
fs/: Remove obsolete references to CONFIG_COMMANDS
[u-boot] / fs / ext2 / ext2fs.c
index c21d2d6172214e6a4ff2909851413ff89b52d398..e65e39b5abfa7e2dfbe23888d3b00c1d9640d0a4 100644 (file)
@@ -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>
@@ -389,7 +389,7 @@ int ext2fs_read_file
        int blockcnt;
        int log2blocksize = LOG2_EXT2_BLOCK_SIZE (node->data);
        int blocksize = 1 << (log2blocksize + DISK_SECTOR_BITS);
-       unsigned int filesize = node->inode.size;
+       unsigned int filesize = __le32_to_cpu(node->inode.size);
 
        /* Adjust len so it we can't read past the end of the file.  */
        if (len > filesize) {