]> asedeno.scripts.mit.edu Git - linux.git/commit
lguest: fix block request handling in example launcher.
authorRusty Russell <rusty@rustcorp.com.au>
Tue, 16 Oct 2012 13:26:13 +0000 (23:56 +1030)
committerRusty Russell <rusty@rustcorp.com.au>
Mon, 22 Oct 2012 07:50:01 +0000 (18:20 +1030)
commitc0316a945ae3df1a9c9d1fb44ac3eb47f16d9cd9
tree1fb9fcadaabb96fc58747d73cf8b492daf8faa89
parent7e05484f02e1ea05a3aae0724d4df1e8a5a1920f
lguest: fix block request handling in example launcher.

virtio requests are scatter-gather-style descriptors, but no
assumptions should be made about the layout.  lguest was lazy here,
but saved by the fact that the network device hands all requests to
tun (which does it correctly) and console and random devices simply
use readv and writev.

Block devices, however, are broken: we convert to iovecs internally,
just make sure we handle the correctly.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
tools/lguest/lguest.c