xemu/hw/9pfs
Michael Tokarev 1b093c480a consolidate qemu_iovec_copy() and qemu_iovec_concat() and make them consistent
qemu_iovec_concat() is currently a wrapper for
qemu_iovec_copy(), use the former (with extra
"0" arg) in a few places where it is used.

Change skip argument of qemu_iovec_copy() from
uint64_t to size_t, since size of qiov itself
is size_t, so there's no way to skip larger
sizes.  Rename it to soffset, to make it clear
that the offset is applied to src.

Also change the only usage of uint64_t in
hw/9pfs/virtio-9p.c, in v9fs_init_qiov_from_pdu() -
all callers of it actually uses size_t too,
not uint64_t.

One added restriction: as for all other iovec-related
functions, soffset must point inside src.

Order of argumens is already good:
 qemu_iovec_memset(QEMUIOVector *qiov, size_t offset,
                   int c, size_t bytes)
vs:
 qemu_iovec_concat(QEMUIOVector *dst,
                   QEMUIOVector *src,
                   size_t soffset, size_t sbytes)
(note soffset is after _src_ not dst, since it applies to src;
for memset it applies to qiov).

Note that in many places where this function is used,
the previous call is qemu_iovec_reset(), which means
many callers actually want copy (replacing dst content),
not concat.  So we may want to add a wrapper like
qemu_iovec_copy() with the same arguments but which
calls qemu_iovec_reset() before _concat().

Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2012-06-11 23:12:11 +04:00
..
codir.c fix typo: delete redundant semicolon 2011-12-06 09:56:41 +00:00
cofile.c hw/9pfs: Add new security model mapped-file. 2012-01-19 12:21:11 +05:30
cofs.c hw/9pfs: Use export_flag for indicating whether fs driver use path names. 2011-10-15 15:30:27 +05:30
coxattr.c hw/9pfs: Implement TFLUSH operation 2011-09-22 21:38:52 +05:30
virtio-9p-coth.c Don't use g_thread_get_initialized. 2011-09-09 12:58:16 -05:00
virtio-9p-coth.h fix spelling in hw sub directory 2011-12-06 09:56:41 +00:00
virtio-9p-device.c qom: Unify type registration 2012-02-15 09:39:21 -06:00
virtio-9p-handle.c hw/9pfs: Preserve S_ISGID 2012-01-30 10:54:16 +05:30
virtio-9p-local.c hw/9pfs: Preserve S_ISGID 2012-01-30 10:54:16 +05:30
virtio-9p-posix-acl.c configure: fix detection for xattr.h on modern distributions 2011-11-09 12:06:20 -06:00
virtio-9p-proxy.c virtio-9p-proxy: Fix typo causing compile failure on 32 bit hosts 2012-01-06 12:50:44 -06:00
virtio-9p-proxy.h hw/9pfs: Proxy getversion 2012-01-04 20:20:55 +05:30
virtio-9p-synth.c hw/9pfs: Use the correct file descriptor in Fsdriver Callback 2011-12-04 22:35:28 +05:30
virtio-9p-synth.h hw/9pfs: Add synthetic file system support using 9p 2011-10-31 12:34:18 +05:30
virtio-9p-xattr-user.c [virtio-9p] Make rpath thread safe 2011-06-01 10:25:17 -07:00
virtio-9p-xattr.c Use glib memory allocation and free functions 2011-08-20 23:01:08 -05:00
virtio-9p-xattr.h configure: fix detection for xattr.h on modern distributions 2011-11-09 12:06:20 -06:00
virtio-9p.c consolidate qemu_iovec_copy() and qemu_iovec_concat() and make them consistent 2012-06-11 23:12:11 +04:00
virtio-9p.h hw/9pfs: Move pdu_marshal/unmarshal code to a seperate file 2012-01-04 19:51:28 +05:30