summaryrefslogtreecommitdiffstats
path: root/src/simfs.c
diff options
context:
space:
mode:
authorAndrzej Zaborowski <andrew.zaborowski@intel.com>2011-01-29 01:29:17 +0100
committerMarcel Holtmann <marcel@holtmann.org>2011-01-29 18:39:37 +0100
commit882c0c2761a9b28a2cfb3024170d4c1904b9ae5a (patch)
tree5f44e1772687375713d955599acd1459d864a513 /src/simfs.c
parent863ce7d93ab7136ff5dbe28250fe1067ba947b30 (diff)
downloadofono-882c0c2761a9b28a2cfb3024170d4c1904b9ae5a.tar.bz2
simfs: Reset op_source in simfs_read_block
If the block is not in cache or if this is the last block of a last op in the queue, then fs->op_source might be left with the wrong value.
Diffstat (limited to 'src/simfs.c')
-rw-r--r--src/simfs.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/simfs.c b/src/simfs.c
index b77e1dc0..35045a12 100644
--- a/src/simfs.c
+++ b/src/simfs.c
@@ -269,6 +269,8 @@ static gboolean sim_fs_op_read_block(gpointer user_data)
int end_block;
unsigned short read_bytes;
+ fs->op_source = 0;
+
start_block = op->offset / 256;
end_block = (op->offset + (op->num_bytes - 1)) / 256;