X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=fs%2Fext4%2Fext4_write.c;h=e027916763f9b52937c7fe13f1698b67b94eb901;hb=3e4dad50320d20894710276eb09f2057c6985065;hp=f7c52cc4cc1493c81d4a2467a67196a3df6eaf07;hpb=fc9b0b80435cda721fbdbe507c9e4f388b0ea62b;p=u-boot diff --git a/fs/ext4/ext4_write.c b/fs/ext4/ext4_write.c index f7c52cc4cc..e027916763 100644 --- a/fs/ext4/ext4_write.c +++ b/fs/ext4/ext4_write.c @@ -23,6 +23,7 @@ #include +#include #include #include #include "ext4_common.h" @@ -986,24 +987,18 @@ int ext4_write_file(const char *filename, void *buf, loff_t offset, return -1; } - /* mount the filesystem */ - if (!ext4fs_mount(0)) { - printf("** Error Bad ext4 partition **\n"); - goto fail; - } - ret = ext4fs_write(filename, buf, len); - if (ret) { printf("** Error ext4fs_write() **\n"); goto fail; } - ext4fs_close(); + + *actwrite = len; return 0; fail: - ext4fs_close(); + *actwrite = 0; return -1; }