bootmode: remove build warnings
[profile/mobile/platform/kernel/u-boot-tm1.git] / property / fs_common_rw.c
index 5fb46ea..272eb22 100644 (file)
@@ -1,4 +1,5 @@
 #include <common.h>
+#include <malloc.h>
 #include <linux/types.h>
 #include <linux/string.h>
 #include <nand.h>
 #include "../drivers/mmc/card_sdio.h"
 #endif
 
+#ifdef CONFIG_FS_EXT4
+extern int ext4_read_content(int dev, wchar_t* partition_name, const char *filename, void *buf, int offset, int len);
+#endif
+
 int do_fs_file_read(char *mpart, char *filenm, void *buf, int len)
 {
        int ret=-1;
@@ -107,7 +112,7 @@ int do_raw_data_read(char *part, u32 size, u32 off, char *buf)
        cursct = info.start + off/EMMC_SECTOR_SIZE;
        //read first unaligned data
        if(offp) {
-               if(!Emmc_Read(PARTITION_USER, cursct, 1, sctbuf))
+               if(!Emmc_Read(PARTITION_USER, cursct, 1, (uint8 *)sctbuf))
                        goto end;
                cursct += 1;
                memcpy(bufwp,sctbuf+offp,len);
@@ -115,14 +120,14 @@ int do_raw_data_read(char *part, u32 size, u32 off, char *buf)
        }
        //read sector aligned data
        if(nsct) {
-               if(!Emmc_Read(PARTITION_USER, cursct, nsct, bufwp))
+               if(!Emmc_Read(PARTITION_USER, cursct, nsct, (uint8 *)bufwp))
                        goto end;
                cursct += nsct;
                bufwp += size-left;
        }
        //read last unaligned data
        if(left) {
-               if(!Emmc_Read(PARTITION_USER, cursct, 1, sctbuf))
+               if(!Emmc_Read(PARTITION_USER, cursct, 1, (uint8 *)sctbuf))
                        goto end;
                memcpy(bufwp,sctbuf,left);
                bufwp += left;
@@ -248,9 +253,9 @@ try_ubi:
        }
        ret = 0;
        ubi_close_volume(vol);
-#endif
 
 end:
+#endif
        if (ret)
                printf("do_raw_data_write error.\n");
        return ret;