aboutsummaryrefslogtreecommitdiff
path: root/hw/9pfs/virtio-9p-device.c
diff options
context:
space:
mode:
authorWei Liu <wei.liu2@citrix.com>2015-12-03 12:40:28 +0000
committerAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>2016-01-08 15:19:40 +0530
commitfe9fa96d7c83efc1457bd6a5b07aab7550c6d197 (patch)
tree9ed58288faa4eb234ff693120adabf1d383b502b /hw/9pfs/virtio-9p-device.c
parent0e2082d9e5aafbde9d1cf71159ce0123cd9fda05 (diff)
9pfs: factor out virtio_pdu_{,un}marshal
Signed-off-by: Wei Liu <wei.liu2@citrix.com> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Diffstat (limited to 'hw/9pfs/virtio-9p-device.c')
-rw-r--r--hw/9pfs/virtio-9p-device.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/hw/9pfs/virtio-9p-device.c b/hw/9pfs/virtio-9p-device.c
index f3091cc813..d77247f3cd 100644
--- a/hw/9pfs/virtio-9p-device.c
+++ b/hw/9pfs/virtio-9p-device.c
@@ -156,6 +156,20 @@ static void virtio_9p_device_unrealize(DeviceState *dev, Error **errp)
g_free(s->tag);
}
+ssize_t virtio_pdu_vmarshal(V9fsPDU *pdu, size_t offset,
+ const char *fmt, va_list ap)
+{
+ return v9fs_iov_vmarshal(pdu->elem.in_sg, pdu->elem.in_num,
+ offset, 1, fmt, ap);
+}
+
+ssize_t virtio_pdu_vunmarshal(V9fsPDU *pdu, size_t offset,
+ const char *fmt, va_list ap)
+{
+ return v9fs_iov_vunmarshal(pdu->elem.out_sg, pdu->elem.out_num,
+ offset, 1, fmt, ap);
+}
+
/* virtio-9p device */
static Property virtio_9p_properties[] = {