Fwd: [Milkymist-devel] [PATCH] imfs: give a default value to st_blksize
Sebastien Bourdeauducq
sebastien at milkymist.org
Wed Jun 1 15:19:49 UTC 2011
-------- Forwarded Message --------
From: Xiangfu Liu <xiangfu at sharism.cc>
Reply-to: "Milkymist One, Milkymist SoC and Flickernoise developers'
list" <devel at lists.milkymist.org>
To: devel at lists.milkymist.org
Subject: [Milkymist-devel] [PATCH] imfs: give a default value to
st_blksize
Date: Tue, 31 May 2011 22:55:02 +0800
---
cpukit/libfs/src/imfs/imfs_stat.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
Hi Sebastien
this patch fix https://github.com/milkymist/bugs/issues/17.
diff --git a/cpukit/libfs/src/imfs/imfs_stat.c b/cpukit/libfs/src/imfs/imfs_stat.c
index fa9a5c2..eb6e62e 100644
--- a/cpukit/libfs/src/imfs/imfs_stat.c
+++ b/cpukit/libfs/src/imfs/imfs_stat.c
@@ -77,5 +77,12 @@ int IMFS_stat(
buf->st_mtime = the_jnode->stat_mtime;
buf->st_ctime = the_jnode->stat_ctime;
+ /*
+ * Give a default value to st_blksize, when 'mv' file from imfs to other fs
+ * st_blksize == 0 will cause problem, like: there is malloc in 'mv' base on
+ * st_blksize
+ */
+ buf->st_blksize = 1024;
+
return 0;
}
--
1.7.0.4
_______________________________________________
http://lists.milkymist.org/listinfo.cgi/devel-milkymist.org
IRC: #milkymist at Freenode
Twitter: www.twitter.com/milkymistvj
Ideas? http://milkymist.uservoice.com
More information about the users
mailing list