Alexander
sorry if I wasn't clear enough. I wasn't arguing about your patch
(which is
correct) but was trying to explain why the old implementation was
done the way
it was, in an (obviously excessive) effort to prevent a buffer
overflow for the
response (which used to be hardcoded to 32 bytes regardless of the
size of the
buffer) as shown by :
http://svn.savannah.gnu.org/viewvc/trunk/hw/ide.c?root=qemu&r1=3147&r2=3161
a slightly modified version of your patch (which I'd been using
against kvm
and validated correct with Linux and Solaris guests) attached.
the only difference, is that it handles explicitly the empty buffer
case and
cleans up the len calculation which shouldn't had been calculated
conditionally as you pointed out.
Carlo
<kvm-69-qemu-ide-dvdrom.patch>