The CHIOGSTATUS ioctl of the SCSI media changer driver (sys/scsi/ch.c)

is broken.  It omits the SCSI_DATA_IN flag in the SCSI READ ELEMENT
STATUS command, which makes the 'chio status' command fail.

PR:		6528
Reviewed by:	phk
Submitted by:	Hans Huebner <hans@artcom.de>
This commit is contained in:
Poul-Henning Kamp 1998-05-06 09:11:20 +00:00
parent 9a84338c84
commit f64fbf5477

View File

@ -33,7 +33,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: ch.c,v 1.43 1998/01/24 02:54:48 eivind Exp $
* $Id: ch.c,v 1.44 1998/04/16 12:28:30 peter Exp $
*/
#include "opt_devfs.h"
@ -628,7 +628,7 @@ ch_getelemstatus(sc, first, count, data, datalen)
* Send command to changer.
*/
return (scsi_scsi_cmd(sc->sc_link, (struct scsi_generic *)&cmd,
sizeof(cmd), (u_char *)data, datalen, CHRETRIES, 100000, NULL, 0));
sizeof(cmd), (u_char *)data, datalen, CHRETRIES, 100000, NULL, SCSI_DATA_IN));
}