svn commit: r275007 - user/marcel/libvdsk/bhyveload
Marcel Moolenaar
marcel at FreeBSD.org
Tue Nov 25 05:53:40 UTC 2014
Author: marcel
Date: Tue Nov 25 05:53:39 2014
New Revision: 275007
URL: https://svnweb.freebsd.org/changeset/base/275007
Log:
Change the only user of vdsk_read() to vdsk_readv(). This simplifies
the interface at virtually no cost.
Modified:
user/marcel/libvdsk/bhyveload/bhyveload.c
Modified: user/marcel/libvdsk/bhyveload/bhyveload.c
==============================================================================
--- user/marcel/libvdsk/bhyveload/bhyveload.c Tue Nov 25 05:25:12 2014 (r275006)
+++ user/marcel/libvdsk/bhyveload/bhyveload.c Tue Nov 25 05:53:39 2014 (r275007)
@@ -288,11 +288,15 @@ static int
cb_diskread(void *arg, int unit, uint64_t from, void *to, size_t size,
size_t *resid)
{
+ struct iovec iov;
ssize_t n;
if (unit < 0 || unit >= ndisks)
return (EIO);
- n = vdsk_read(disk[unit], to, size, from);
+
+ iov.iov_base = to;
+ iov.iov_len = size;
+ n = vdsk_readv(disk[unit], &iov, 1, from);
if (n < 0)
return (errno);
*resid = size - n;
More information about the svn-src-user
mailing list