X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=property%2Ffs_common_rw.c;h=272eb2269b699d4739d3de0ffbccb62c2e374884;hb=3a763d560a9c390fbe2c2d4463ecc4c980f7d854;hp=5fb46ea92668479148c0f85cc66f016e1426585b;hpb=a4eddf5b16cd522496e70bc550db6eb6ae756d1c;p=profile%2Fmobile%2Fplatform%2Fkernel%2Fu-boot-tm1.git diff --git a/property/fs_common_rw.c b/property/fs_common_rw.c index 5fb46ea..272eb22 100644 --- a/property/fs_common_rw.c +++ b/property/fs_common_rw.c @@ -1,4 +1,5 @@ #include +#include #include #include #include @@ -11,6 +12,10 @@ #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;