projects
/
profile
/
mobile
/
platform
/
kernel
/
u-boot-tm1.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
bootmode: remove build warnings
[profile/mobile/platform/kernel/u-boot-tm1.git]
/
property
/
fs_common_rw.c
diff --git
a/property/fs_common_rw.c
b/property/fs_common_rw.c
index
5fb46ea
..
272eb22
100644
(file)
--- a/
property/fs_common_rw.c
+++ b/
property/fs_common_rw.c
@@
-1,4
+1,5
@@
#include <common.h>
#include <common.h>
+#include <malloc.h>
#include <linux/types.h>
#include <linux/string.h>
#include <nand.h>
#include <linux/types.h>
#include <linux/string.h>
#include <nand.h>
@@
-11,6
+12,10
@@
#include "../drivers/mmc/card_sdio.h"
#endif
#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;
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) {
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);
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) {
}
//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) {
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;
goto end;
memcpy(bufwp,sctbuf,left);
bufwp += left;
@@
-248,9
+253,9
@@
try_ubi:
}
ret = 0;
ubi_close_volume(vol);
}
ret = 0;
ubi_close_volume(vol);
-#endif
end:
end:
+#endif
if (ret)
printf("do_raw_data_write error.\n");
return ret;
if (ret)
printf("do_raw_data_write error.\n");
return ret;