Tue Jul 14 12:25:36 2015 UTC ()
After executing a scsi command reset the timeout to default value
(like other scsi backends do).
Bump PKGREVISION


(bouyer)
diff -r1.1.1.1 -r1.2 pkgsrc/sysutils/mtx/Makefile
diff -r1.2 -r1.3 pkgsrc/sysutils/mtx/distinfo
diff -r1.2 -r1.3 pkgsrc/sysutils/mtx/patches/patch-scsi_netbsd.c

cvs diff -r1.1.1.1 -r1.2 pkgsrc/sysutils/mtx/Makefile (expand / switch to unified diff)

--- pkgsrc/sysutils/mtx/Makefile 2015/07/09 10:27:39 1.1.1.1
+++ pkgsrc/sysutils/mtx/Makefile 2015/07/14 12:25:36 1.2
@@ -1,16 +1,17 @@ @@ -1,16 +1,17 @@
1# $NetBSD: Makefile,v 1.1.1.1 2015/07/09 10:27:39 bouyer Exp $ 1# $NetBSD: Makefile,v 1.2 2015/07/14 12:25:36 bouyer Exp $
2 2
3DISTNAME= mtx-1.3.12 3DISTNAME= mtx-1.3.12
 4PKGREVISION= 1
4CATEGORIES= sysutils 5CATEGORIES= sysutils
5MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=mtx/mtx-stable/1.3.12/} 6MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=mtx/mtx-stable/1.3.12/}
6 7
7MAINTAINER= bouyer@NetBSD.org 8MAINTAINER= bouyer@NetBSD.org
8HOMEPAGE= http://mtx.badtux.net/ 9HOMEPAGE= http://mtx.badtux.net/
9COMMENT= Control SCSI media changer devices 10COMMENT= Control SCSI media changer devices
10 11
11USE_TOOLS+= gmake  12USE_TOOLS+= gmake
12GNU_CONFIGURE= yes 13GNU_CONFIGURE= yes
13 14
14LICENSE= gnu-gpl-v2 15LICENSE= gnu-gpl-v2
15 16
16.include "../../mk/bsd.pkg.mk" 17.include "../../mk/bsd.pkg.mk"

cvs diff -r1.2 -r1.3 pkgsrc/sysutils/mtx/distinfo (expand / switch to unified diff)

--- pkgsrc/sysutils/mtx/distinfo 2015/07/10 13:33:41 1.2
+++ pkgsrc/sysutils/mtx/distinfo 2015/07/14 12:25:36 1.3
@@ -1,9 +1,9 @@ @@ -1,9 +1,9 @@
1$NetBSD: distinfo,v 1.2 2015/07/10 13:33:41 bouyer Exp $ 1$NetBSD: distinfo,v 1.3 2015/07/14 12:25:36 bouyer Exp $
2 2
3SHA1 (mtx-1.3.12.tar.gz) = 9823426934261c9186ed5954f67068e44d3f7cf3 3SHA1 (mtx-1.3.12.tar.gz) = 9823426934261c9186ed5954f67068e44d3f7cf3
4RMD160 (mtx-1.3.12.tar.gz) = 7c9a762b489c1923e5508225cf8a5da8c53cc50f 4RMD160 (mtx-1.3.12.tar.gz) = 7c9a762b489c1923e5508225cf8a5da8c53cc50f
5Size (mtx-1.3.12.tar.gz) = 235214 bytes 5Size (mtx-1.3.12.tar.gz) = 235214 bytes
6SHA1 (patch-Makefile.in) = 4a526c1b362c08a7c5bd5a39b16ecf336e4b31c1 6SHA1 (patch-Makefile.in) = 4a526c1b362c08a7c5bd5a39b16ecf336e4b31c1
7SHA1 (patch-mtx.h) = 0b1a35ea5dc4dd639cf2bdc79bcfb06d2a551427 7SHA1 (patch-mtx.h) = 0b1a35ea5dc4dd639cf2bdc79bcfb06d2a551427
8SHA1 (patch-mtxl.c) = 6e1318d3501d49c670439da36f3654fc0e6d54f2 8SHA1 (patch-mtxl.c) = 6e1318d3501d49c670439da36f3654fc0e6d54f2
9SHA1 (patch-scsi_netbsd.c) = f763530fbac164a33f7704d0b0a80f135f18bb24 9SHA1 (patch-scsi_netbsd.c) = 8b14d7553965e303aa2fe693aaa5c9d94d8e7b24

cvs diff -r1.2 -r1.3 pkgsrc/sysutils/mtx/patches/patch-scsi_netbsd.c (expand / switch to unified diff)

--- pkgsrc/sysutils/mtx/patches/patch-scsi_netbsd.c 2015/07/10 13:33:41 1.2
+++ pkgsrc/sysutils/mtx/patches/patch-scsi_netbsd.c 2015/07/14 12:25:36 1.3
@@ -1,18 +1,18 @@ @@ -1,18 +1,18 @@
1$NetBSD: patch-scsi_netbsd.c,v 1.2 2015/07/10 13:33:41 bouyer Exp $ 1$NetBSD: patch-scsi_netbsd.c,v 1.3 2015/07/14 12:25:36 bouyer Exp $
2 2
3--- /dev/null 2015-07-08 16:44:57.000000000 +0200 3--- scsi_netbsd.c.orig 2015-07-14 13:48:44.000000000 +0200
4+++ scsi_netbsd.c 2015-07-08 16:58:09.000000000 +0200 4+++ scsi_netbsd.c 2015-07-14 13:58:53.000000000 +0200
5@@ -0,0 +1,156 @@ 5@@ -0,0 +1,157 @@
6+/* Changes 2003 Steve Heck <steve.heck@am.sony.com> 6+/* Changes 2003 Steve Heck <steve.heck@am.sony.com>
7+ Copyright 2007-2008 by Robert Nelson <robertn@the-nelsons.org> 7+ Copyright 2007-2008 by Robert Nelson <robertn@the-nelsons.org>
8+ 8+
9+ This program is free software; you may redistribute and/or modify it under 9+ This program is free software; you may redistribute and/or modify it under
10+ the terms of the GNU General Public License Version 2 as published by the 10+ the terms of the GNU General Public License Version 2 as published by the
11+ Free Software Foundation. 11+ Free Software Foundation.
12+ 12+
13+ This program is distributed in the hope that it will be useful, but 13+ This program is distributed in the hope that it will be useful, but
14+ WITHOUT ANY WARRANTY, without even the implied warranty of MERCHANTABILITY 14+ WITHOUT ANY WARRANTY, without even the implied warranty of MERCHANTABILITY
15+ or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 15+ or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
16+ for complete details. 16+ for complete details.
17+ 17+
18+*/ 18+*/
@@ -125,26 +125,27 @@ $NetBSD: patch-scsi_netbsd.c,v 1.2 2015/ @@ -125,26 +125,27 @@ $NetBSD: patch-scsi_netbsd.c,v 1.2 2015/
125+ 125+
126+ req.timeout = timeout * 1000; 126+ req.timeout = timeout * 1000;
127+ 127+
128+ memset(&req.cmd[0], 0, sizeof(req.cmd)); 128+ memset(&req.cmd[0], 0, sizeof(req.cmd));
129+ memcpy(&req.cmd[0], CDB, CDB_Length); 129+ memcpy(&req.cmd[0], CDB, CDB_Length);
130+ req.cmdlen = CDB_Length; 130+ req.cmdlen = CDB_Length;
131+ 131+
132+ req.databuf = DataBuffer; 132+ req.databuf = DataBuffer;
133+ req.datalen = DataBufferLength; 133+ req.datalen = DataBufferLength;
134+ 134+
135+ req.senselen = SENSEBUFLEN; 135+ req.senselen = SENSEBUFLEN;
136+ req.senselen_used = 0; 136+ req.senselen_used = 0;
137+ ioctl_result = ioctl(DeviceFD, SCIOCCOMMAND, &req); 137+ ioctl_result = ioctl(DeviceFD, SCIOCCOMMAND, &req);
 138+ SCSI_Default_Timeout(); /* set it back to default, sigh. */
138+ 139+
139+ if (ioctl_result < 0) 140+ if (ioctl_result < 0)
140+ { 141+ {
141+ perror("mtx: SCIOCCOMMAND"); 142+ perror("mtx: SCIOCCOMMAND");
142+ return ioctl_result; 143+ return ioctl_result;
143+ } 144+ }
144+ if (req.senselen_used > 0) { 145+ if (req.senselen_used > 0) {
145+ memcpy(RequestSense, &req.sense[0], 146+ memcpy(RequestSense, &req.sense[0],
146+ min(req.senselen_used, sizeof(RequestSense_T))); 147+ min(req.senselen_used, sizeof(RequestSense_T)));
147+ } 148+ }
148+ 149+
149+ if (req.retsts != SCCMD_OK) 150+ if (req.retsts != SCCMD_OK)
150+ { 151+ {