ide: commonize io_buffer_index initialization
authorPaolo Bonzini <pbonzini@redhat.com>
Mon, 23 Feb 2015 16:18:00 +0000 (11:18 -0500)
committerKevin Wolf <kwolf@redhat.com>
Tue, 10 Mar 2015 13:02:22 +0000 (14:02 +0100)
commitc71c06d437d4cccf753cb41731e5a71f54317a01
tree914ca3f9700f07a54010e6ad359b75f21661bcd5
parentd12b9ff2a4e21587e5b180008c88a0e6e1ec8ac5
ide: commonize io_buffer_index initialization

Resetting the io_buffer_index to 0 is commonized,
with the exception of the case within ide_atapi_cmd_reply,
where we need to reset this index to 0 prior to the
ide_atapi_cmd_reply_end call.

Note that not all calls to ide_atapi_cmd_reply_end
expect the index to be 0, so setting it there is
not appropriate.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: John Snow <jsnow@redhat.com>
Message-id: 1424708286-16483-12-git-send-email-jsnow@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
hw/ide/atapi.c
hw/ide/core.c