set st->media_fileno and st->media_blkno before returning. Not sure
if this is needed or even really correct, but it's an unintentional
behavior change due to removing scsi_scsi_cmd().
ok dlg@
-/* $OpenBSD: st.c,v 1.105 2010/07/22 00:31:06 krw Exp $ */
+/* $OpenBSD: st.c,v 1.106 2010/07/22 05:26:34 matthew Exp $ */
/* $NetBSD: st.c,v 1.71 1997/02/21 23:03:49 thorpej Exp $ */
/*
return 0;
xs = scsi_xs_get(st->sc_link, flags);
- if (xs == NULL)
+ if (xs == NULL) {
+ st->media_fileno = -1;
+ st->media_blkno = -1;
return (ENOMEM);
+ }
xs->cmd->opcode = SPACE;
cmd = (struct scsi_space *)xs->cmd;
return (EINVAL);
xs = scsi_xs_get(st->sc_link, flags);
- if (xs == NULL)
+ if (xs == NULL) {
+ st->media_fileno = -1;
+ st->media_blkno = -1;
return (ENOMEM);
+ }
xs->cmd->opcode = WRITE_FILEMARKS;
xs->cmdlen = sizeof(*cmd);
xs->timeout = ST_IO_TIME * 4;