diff options
author | Andrzej Zaborowski <andrew.zaborowski@intel.com> | 2011-01-29 01:29:17 +0100 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2011-01-29 18:39:37 +0100 |
commit | 882c0c2761a9b28a2cfb3024170d4c1904b9ae5a (patch) | |
tree | 5f44e1772687375713d955599acd1459d864a513 /src/simfs.c | |
parent | 863ce7d93ab7136ff5dbe28250fe1067ba947b30 (diff) | |
download | ofono-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.c | 2 |
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; |