static struct pdumpfs_frame *frame_current_debugfs;
static int frame_current_open_count;
+static loff_t stream_start;
+static loff_t stream_end;
+
static struct pdumpfs_frame *
frame_create(void)
{
frame_destroy(frame);
frame_count--;
}
+
+ stream_start = 0;
+ stream_end = 0;
}
static void
frame_stream = frame->next;
frame->next = NULL;
+ stream_end -= frame->offset;
+
/*
* we cannot have frames vanish in the middle of reading
* them through debugfs
mutex_lock(pdumpfs_mutex);
size = pdumpfs_frame_write(buffer, size, from_user);
+ if ((size > 0) && (frame_current != frame_init))
+ stream_end += size;
mutex_unlock(pdumpfs_mutex);
void
pdumpfs_write_string(char *string)
{
+ size_t size;
+
mutex_lock(pdumpfs_mutex);
- pdumpfs_frame_write(string, strlen(string), false);
+ size = pdumpfs_frame_write(string, strlen(string), false);
+ if ((size > 0) && (frame_current != frame_init))
+ stream_end += size;
mutex_unlock(pdumpfs_mutex);
}