simfs: Add some debug statements
authorDenis Kenzior <denkenz@gmail.com>
Wed, 13 Oct 2010 07:37:59 +0000 (02:37 -0500)
committerDenis Kenzior <denkenz@gmail.com>
Wed, 13 Oct 2010 10:04:47 +0000 (05:04 -0500)
src/simfs.c

index da3e345..fd92e50 100644 (file)
@@ -235,6 +235,9 @@ static void sim_fs_op_read_block_cb(const struct ofono_error *error,
                tocopy = len;
        }
 
+       DBG("bufoff: %d, dataoff: %d, tocopy: %d",
+                               bufoff, dataoff, tocopy);
+
        memcpy(op->buffer + bufoff, data + dataoff, tocopy);
        cache_block(fs, op->current, 256, data, len);
 
@@ -295,6 +298,9 @@ static gboolean sim_fs_op_read_block(gpointer user_data)
                        toread = MIN(256, op->length - op->current * 256);
                }
 
+               DBG("bufoff: %d, seekoff: %d, toread: %d",
+                               bufoff, seekoff, toread);
+
                if (lseek(fs->fd, seekoff, SEEK_SET) == (off_t) -1)
                        break;