vio_get_iov()

Convert a VirtIO descriptor request into an iov array

Synopsis:

#include <qvm/vio.h>
ssize_t vio_get_iov(const vdev_t *vdp,
                    struct virtq *vq,
                    uint16_t didx,
                    struct vio_iov *iov)

Arguments:

vdp
A pointer to a vdev's state structure.
vq
A pointer to the virtual queue for which we are converting descriptors.
didx
An index to the descriptor.
iov
A pointer to a converted request structure.

Library:

Provided by qvm; no external library is required.

Returns:

If successful, the number of bytes to transfer; otherwise a negative errno value.