scsi-generic: decode correctly SCSI tape commands (Laurent Vivier)
authoraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>
Tue, 23 Sep 2008 13:38:44 +0000 (13:38 +0000)
committeraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>
Tue, 23 Sep 2008 13:38:44 +0000 (13:38 +0000)
commita9dd6843be390ec94a4e51cbaa50c43b7cb0357a
treee73a769b4f7178b6d01af3037476435106a4e749
parent828899865fa31f3fc1c2d4c4491a1292ed70c838
scsi-generic: decode correctly SCSI tape commands (Laurent Vivier)

This patch allows to use a "real" SCSI tape with qemu using
"-drive /dev/sgX,if=scsi".

It allows to decode correctly transfer length when the type of the
device is a tape.

Some issues remain when the application reading the tape tries to go
beyond the end of the stream (but they must be corrected at the SCSI
controller level).

Signed-off-by: Laurent Vivier <Laurent.Vivier@bull.net>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5305 c046a42c-6fe2-441c-8c8c-71466251a162
hw/scsi-generic.c