/* This is a naive version. If we ever have a new protocol, we'll expand it. Probably using seq_file.  */
static ssize_t ocfs2_control_read(struct file *file, char __user *buf, size_t count, loff_t *ppos)
/* This is a naive version. If we ever have a new protocol, we'll expand it. Probably using seq_file.  */
static ssize_t ocfs2_control_read(struct file *file, char __user *buf, size_t count, loff_t *ppos)
{
	ssize_t ret;
	ret = simple_read_from_buffer(buf, count, ppos,
			OCFS2_CONTROL_PROTO, OCFS2_CONTROL_PROTO_LEN);
	if (ret > 0 && *ppos >= OCFS2_CONTROL_PROTO_LEN)
		ocfs2_control_set_handshake_state(file,
						  OCFS2_CONTROL_HANDSHAKE_READ);
	return ret;
}