pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/44894: update emulators/hercules to 3.07



>Number:         44894
>Category:       pkg
>Synopsis:       update emulators/hercules to 3.07
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Fri Apr 22 14:30:00 +0000 2011
>Originator:     Rhialto
>Release:        NetBSD 5.1
>Organization:
        
>Environment:
        
        
System: NetBSD radl.falu.nl 5.1 NetBSD 5.1 
(Radl-s_Pervasion_of_the_Incorrect_Chord) #0: Mon Jan 24 20:25:13 CET 2011 
root%vargaz.falu.nl@localhost:/usr/src/sys/arch/amd64/compile/RADL5.1 amd64
Architecture: x86_64
Machine: amd64
>Description:
        emulators/hercules is outdated. Here is a diff for Makefile,
        plus a shar file with replacement patch-?? files.

        I tried to carry over the patches related to tape handling,
        but I can't test it.

        TUN or TAP related code probably doesn't work, like before.
        I don't know how to test it either.
>How-To-Repeat:
        Want to use the latest hercules.
>Fix:
        Diff, then shar file:

? patches/patch-ba
? patches/patch-bb
? patches/patch-bc
? patches/patch-bd
? patches/patch-be
? patches/patch-bf
cvs server: Diffing .
Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/emulators/hercules/Makefile,v
retrieving revision 1.24
diff -u -r1.24 Makefile
--- Makefile    17 Jan 2010 08:02:49 -0000      1.24
+++ Makefile    22 Apr 2011 14:19:33 -0000
@@ -1,32 +1,31 @@
 # $NetBSD: Makefile,v 1.24 2010/01/17 08:02:49 dholland Exp $
 
-DISTNAME=              hercules-2.11
-PKGREVISION=           4
+DISTNAME=              hercules-3.07
 CATEGORIES=            emulators
 MASTER_SITES=          http://www.hercules-390.org/
 
 MAINTAINER=            pkgsrc-users%NetBSD.org@localhost
 HOMEPAGE=              http://www.hercules-390.org/
 COMMENT=               S370 emulator
+LICENSE=               qpl-v1.0
 
 PKG_DESTDIR_SUPPORT=   user-destdir
 
 DEPENDS+=              hercules-images-[0-9]*:../../emulators/hercules-images
 
 USE_TOOLS+=            gmake bash:run
-MAKE_FILE=             makefile
-MAKE_ENV+=             HOST_ARCH=${MACHINE_ARCH:Q}
-
-REPLACE_BASH+=         dasdlist
+GNU_CONFIGURE=         YES
+#MAKE_ENV+=            HOST_ARCH=${MACHINE_ARCH:Q}
 
 PTHREAD_OPTS+=         require
 
 INSTALLATION_DIRS+=    bin share/examples/hercules
-SPECIAL_PERMS+=                ${PREFIX}/bin/hercifc ${SETUID_ROOT_PERMS}
+#CONFIGURE_ARGS+=      --enable-setuid-hercifc=hercules
+#SPECIAL_PERMS+=               ${PREFIX}/bin/hercifc ${SETUID_ROOT_PERMS}
 
 pre-install:
        ${INSTALL_DATA} ${WRKSRC}/hercules.cnf 
${DESTDIR}${PREFIX}/share/examples/hercules/
-       ${INSTALL_DATA} ${WRKSRC}/zzsa.cnf 
${DESTDIR}${PREFIX}/share/examples/hercules/
+#      ${INSTALL_DATA} ${WRKSRC}/zzsa.cnf 
${DESTDIR}${PREFIX}/share/examples/hercules/
 
 .include "../../mk/pthread.buildlink3.mk"
 .include "../../mk/bsd.pkg.mk"
Index: PLIST
===================================================================
RCS file: /cvsroot/pkgsrc/emulators/hercules/PLIST,v
retrieving revision 1.2
diff -u -r1.2 PLIST
--- PLIST       14 Jun 2009 17:51:05 -0000      1.2
+++ PLIST       22 Apr 2011 14:19:33 -0000
@@ -1,23 +1,162 @@
 @comment $NetBSD: PLIST,v 1.2 2009/06/14 17:51:05 joerg Exp $
-bin/hercules
-bin/hercifc
+bin/cckdcdsk
+bin/cckdcomp
+bin/cckddiag
+bin/cckdswap
+bin/cvslvlck
+bin/dasdcat
+bin/dasdconv
+bin/dasdcopy
 bin/dasdinit
 bin/dasdisup
+bin/dasdlist
 bin/dasdload
 bin/dasdls
 bin/dasdpdsu
-bin/tapecopy
-bin/tapelist
-bin/tapemap
-bin/tapesplit
-bin/cckd2ckd
-bin/cckdcdsk
-bin/ckd2cckd
-bin/cckdcomp
+bin/dasdseq
+bin/dmap2hrc
+bin/hercifc
+bin/herclin
+bin/hercules
 bin/hetget
 bin/hetinit
 bin/hetmap
 bin/hetupd
-bin/dasdlist
+bin/tapecopy
+bin/tapemap
+bin/tapesplt
+lib/hercules/dyncrypt.la
+lib/hercules/dyngui.la
+lib/hercules/dyninst.la
+lib/hercules/hdt1052c.la
+lib/hercules/hdt1403.la
+lib/hercules/hdt2703.la
+lib/hercules/hdt2880.la
+lib/hercules/hdt3088.la
+lib/hercules/hdt3270.la
+lib/hercules/hdt3420.la
+lib/hercules/hdt3505.la
+lib/hercules/hdt3525.la
+lib/hercules/hdt3705.la
+lib/hercules/hdteq.la
+lib/hercules/hdtqeth.la
+lib/libdecNumber.la
+lib/libherc.la
+lib/libhercd.la
+lib/libhercs.la
+lib/libherct.la
+lib/libhercu.la
+man/man1/cckddiag.1
+man/man1/dasdseq.1
+man/man4/cckd.4
 share/examples/hercules/hercules.cnf
-share/examples/hercules/zzsa.cnf
+share/hercules/TMOUNT.txt
+share/hercules/awssl-v19g
+share/hercules/awswrite.jcl
+share/hercules/cckddasd.html
+share/hercules/cckddump.hla
+share/hercules/cckdload.hla
+share/hercules/fishgui.html
+share/hercules/hercconf.html
+share/hercules/hercfaq.html
+share/hercules/hercinst.html
+share/hercules/herclic.html
+share/hercules/hercload.html
+share/hercules/hercmsca.html
+share/hercules/hercmscf.html
+share/hercules/hercmscp.html
+share/hercules/hercmsct.html
+share/hercules/hercmscu.html
+share/hercules/hercmsda.html
+share/hercules/hercmsdc.html
+share/hercules/hercmsdg.html
+share/hercules/hercmsdi.html
+share/hercules/hercmsdl.html
+share/hercules/hercmsds.html
+share/hercules/hercmsdt.html
+share/hercules/hercmsdu.html
+share/hercules/hercmsg.html
+share/hercules/hercmshd.html
+share/hercules/hercmshe.html
+share/hercules/hercmshg.html
+share/hercules/hercmshm.html
+share/hercules/hercmsht.html
+share/hercules/hercmshu.html
+share/hercules/hercmsif.html
+share/hercules/hercmsin.html
+share/hercules/hercmslc.html
+share/hercules/hercmslg.html
+share/hercules/hercmspn.html
+share/hercules/hercmspr.html
+share/hercules/hercmspu.html
+share/hercules/hercmsrd.html
+share/hercules/hercmssd.html
+share/hercules/hercmsta.html
+share/hercules/hercmstc.html
+share/hercules/hercmste.html
+share/hercules/hercmstm.html
+share/hercules/hercmsts.html
+share/hercules/hercmstt.html
+share/hercules/hercmstu.html
+share/hercules/hercmsvm.html
+share/hercules/hercnew.html
+share/hercules/hercrdr.html
+share/hercules/hercrnot.html
+share/hercules/hercsupp.html
+share/hercules/herctcp.html
+share/hercules/hercules.css
+share/hercules/hercules.html
+share/hercules/images/back.gif
+share/hercules/images/bkued.gif
+share/hercules/images/blueu.gif
+share/hercules/images/dial1.gif
+share/hercules/images/dial2.gif
+share/hercules/images/dial3.gif
+share/hercules/images/dial4.gif
+share/hercules/images/favicon.ico
+share/hercules/images/greend.gif
+share/hercules/images/greenu.gif
+share/hercules/images/hercpic-rblk-256.gif
+share/hercules/images/hercpic-rblk-80.gif
+share/hercules/images/interruptd.gif
+share/hercules/images/interruptu.gif
+share/hercules/images/loadd.gif
+share/hercules/images/loadoffu.gif
+share/hercules/images/loadonu.gif
+share/hercules/images/loadu.gif
+share/hercules/images/manoffu.gif
+share/hercules/images/manonu.gif
+share/hercules/images/note.gif
+share/hercules/images/osi-certified-60x50.jpg
+share/hercules/images/poweroffd.gif
+share/hercules/images/poweroffu.gif
+share/hercules/images/poweronoffd.gif
+share/hercules/images/poweronoffu.gif
+share/hercules/images/poweronond.gif
+share/hercules/images/powerononu.gif
+share/hercules/images/redd.gif
+share/hercules/images/redu.gif
+share/hercules/images/restartd.gif
+share/hercules/images/restartu.gif
+share/hercules/images/startd.gif
+share/hercules/images/startu.gif
+share/hercules/images/stopd.gif
+share/hercules/images/stopu.gif
+share/hercules/images/stored.gif
+share/hercules/images/storeu.gif
+share/hercules/images/sysoffu.gif
+share/hercules/images/sysonu.gif
+share/hercules/images/translucentoffd.gif
+share/hercules/images/translucentoffu.gif
+share/hercules/images/translucentond.gif
+share/hercules/images/translucentonu.gif
+share/hercules/images/waitoffu.gif
+share/hercules/images/waitonu.gif
+share/hercules/include/footer.htmlpart
+share/hercules/include/header.htmlpart
+share/hercules/index.html
+share/hercules/rawstape.jcl
+share/hercules/shared.html
+share/hercules/tapeconv.jcl
+share/hercules/tasks.html
+share/hercules/zzsacard.bin
Index: distinfo
===================================================================
RCS file: /cvsroot/pkgsrc/emulators/hercules/distinfo,v
retrieving revision 1.10
diff -u -r1.10 distinfo
--- distinfo    17 Jan 2010 08:00:47 -0000      1.10
+++ distinfo    22 Apr 2011 14:19:33 -0000
@@ -1,27 +1,11 @@
 $NetBSD: distinfo,v 1.10 2010/01/17 08:00:47 dholland Exp $
 
-SHA1 (hercules-2.11.tar.gz) = ec84388e29cfd070055afa5fc11a33c896f2333a
-RMD160 (hercules-2.11.tar.gz) = 113647be0bd80ecc52331319902a1140a81b56aa
-Size (hercules-2.11.tar.gz) = 616554 bytes
-SHA1 (patch-aa) = 639ccc667a415fc427996be1972f7b0b67efca2c
-SHA1 (patch-ab) = ea2802d8752411e964ba150d3a54f64a40fc2e70
-SHA1 (patch-ac) = 454ac972ad54f19f139033abe8ccabdbb0c3f88b
-SHA1 (patch-ad) = 51fa93cb9fbc8382de1da52748dffa4ec2bcbf9c
-SHA1 (patch-ae) = 14aafa5462a858e44c00ea6d43efd0f1cfef190e
-SHA1 (patch-af) = 759ad1ee2737ed8021b5a5fd956851677e99879a
-SHA1 (patch-ag) = 6dcec345641bdde0c617da10f57b6f2dd6b702ac
-SHA1 (patch-ah) = 06e03dc32c91ab5d3125a3b5489d15ef5c1e144c
-SHA1 (patch-aj) = 8584ff1c318e72a52ae597457368114998a89cb6
-SHA1 (patch-ak) = 5b594849074ac410f2b8c93f2df0dca874b4533a
-SHA1 (patch-al) = 60d90ed9c1476b8fcf0a905a8316f3aec9108169
-SHA1 (patch-am) = 4626f39156ac2beccd9911f795aff6f9fe7b997b
-SHA1 (patch-an) = 207bff27722867a7a934863451152df2ba8aa2c6
-SHA1 (patch-ao) = 4d389c21d36ab44565f8e90f90dad8acff24e747
-SHA1 (patch-ap) = 7edbd0f8ec738cf1ed6be0d14f7f6882ba0d225b
-SHA1 (patch-aq) = 7b54514b1833da0875f98794e06dcd2e43f0ad4a
-SHA1 (patch-ar) = 37892292e02ba5be83e76bb2d4134bea875ca73a
-SHA1 (patch-as) = 281d81485186f4aa44938e4152050796d564629a
-SHA1 (patch-at) = 75cbca5dcf21df9af227ac49825986217f4491f8
-SHA1 (patch-au) = d1761b4845fdee6633e728d4cf86b8f00ce9b5d4
-SHA1 (patch-av) = ec670511d4aeef9bba08cd6edf16f64a624d10b9
-SHA1 (patch-aw) = cb0f64d81d4c20d237a108cc3baac12f3d4923b1
+SHA1 (hercules-3.07.tar.gz) = d0b2e543dd66ee43576e5a5faff8f4cc061cffb4
+RMD160 (hercules-3.07.tar.gz) = 241344a3242a1dacc5276dd61b7fa4c92a270f71
+Size (hercules-3.07.tar.gz) = 2701835 bytes
+SHA1 (patch-ba) = 771da13cc09be4db4efe35d66946b1677912539d
+SHA1 (patch-bb) = 01dcebaf619d6fc04eeba8f03d9f2f72c348f6a1
+SHA1 (patch-bc) = 0f053af2f865e002fcbdd86c2305c9fa96670721
+SHA1 (patch-bd) = 80c09200c3454be6bb3ee53661878968dd099919
+SHA1 (patch-be) = 89206d041a47c06882239117d28904f4b80eddc2
+SHA1 (patch-bf) = 3b6d535facd2bf9c3cd7eb1a6a788c7e1dfff07b
cvs server: Diffing patches
cvs server: cannot find patches/patch-aa
cvs server: cannot find patches/patch-ab
cvs server: cannot find patches/patch-ac
cvs server: cannot find patches/patch-ad
cvs server: cannot find patches/patch-ae
cvs server: cannot find patches/patch-af
cvs server: cannot find patches/patch-ag
cvs server: cannot find patches/patch-ah
cvs server: cannot find patches/patch-aj
cvs server: cannot find patches/patch-ak
cvs server: cannot find patches/patch-al
cvs server: cannot find patches/patch-am
cvs server: cannot find patches/patch-an
cvs server: cannot find patches/patch-ao
cvs server: cannot find patches/patch-ap
cvs server: cannot find patches/patch-aq
cvs server: cannot find patches/patch-ar
cvs server: cannot find patches/patch-as
cvs server: cannot find patches/patch-at
cvs server: cannot find patches/patch-au
cvs server: cannot find patches/patch-av
cvs server: cannot find patches/patch-aw


# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#       patches/patch-ba
#       patches/patch-bb
#       patches/patch-bc
#       patches/patch-bd
#       patches/patch-be
#       patches/patch-bf
#
echo x - patches/patch-ba
sed 's/^X//' >patches/patch-ba << 'END-of-patches/patch-ba'
X$NetBSD$
X
XThis patch doesn't mean tun or tap support actually works...
Xit is more a bit of a placeholder.
X
X--- hercifc.h.orig     2011-04-19 15:49:30.000000000 +0000
X+++ hercifc.h
X@@ -90,7 +90,11 @@
X // --------------------------------------------------------------------
X 
X #define  HERCIFC_CMD  "hercifc"           // Interface config command
X+#if defined(__FreeBSD__) || defined(__NetBSD__)
X+#define  HERCTUN_DEV  "/dev/tun"          // Default TUN/TAP char dev
X+#else
X #define  HERCTUN_DEV  "/dev/net/tun"      // Default TUN/TAP char dev
X+#endif
X 
X typedef struct _CTLREQ
X {
END-of-patches/patch-ba
echo x - patches/patch-bb
sed 's/^X//' >patches/patch-bb << 'END-of-patches/patch-bb'
X$NetBSD$
X
X--- hostopts.h.orig    2011-04-19 15:49:45.000000000 +0000
X+++ hostopts.h
X@@ -272,7 +272,7 @@
X /*-------------------------------------------------------------------*/
X /* Hard-coded FreeBSD-specific features and options...               */
X /*-------------------------------------------------------------------*/
X-#elif defined(__FreeBSD__)              /* "FreeBSD" options         */
X+#elif defined(__FreeBSD__) || defined(__NetBSD__)/* "BSD" options    */
X 
X #define DLL_IMPORT   extern
X #define DLL_EXPORT
X@@ -295,6 +295,14 @@
X #undef  OPTION_EXTCURS                  /* Normal cursor handling    */
X 
X 
X+/* These should become configure checks */
X+# if defined(__NetBSD__)
X+#  define OPTION_SCSI_TAPE                /* SCSI tape support         */
X+# endif
X+# if !defined(SOL_TCP)
X+#  define SOL_TCP     IPPROTO_TCP
X+# endif
X+
X /*-------------------------------------------------------------------*/
X /* GNU Linux options...                                              */
X /*-------------------------------------------------------------------*/
END-of-patches/patch-bb
echo x - patches/patch-bc
sed 's/^X//' >patches/patch-bc << 'END-of-patches/patch-bc'
X$NetBSD$
X
XLinux tape handling.
X
X--- hstructs.h.orig    2011-04-19 15:49:59.000000000 +0000
X+++ hstructs.h
X@@ -1025,9 +1025,13 @@ struct DEVBLK {                         
X         U32     msgid;                  /* Message Id of async. i/o  */
X #if defined(OPTION_SCSI_TAPE)
X         struct mtget mtget;             /* SCSI tape status struct   */
X+#if (defined(BSD) && BSD >= 199306)
X+#define sstat  mtget.mt_erreg
X+#else
X #define sstat  mtget.mt_gstat           /* Generic SCSI tape device-
X                                            independent status field;
X                                            (struct mtget->mt_gstat)  */
X+#endif
X         TID     stape_mountmon_tid;     /* Tape-mount monitor thread */
X         u_int   stape_close_rewinds:1;  /* 1=Rewind at close         */
X         u_int   stape_blkid_32:1;       /* 1=block-ids are 32 bits   */
X@@ -1039,7 +1043,11 @@ struct DEVBLK {                         
X         COND    stape_getstat_cond;     /* COND for status wrkr thrd */
X         COND    stape_exit_cond;        /* thread wait for exit COND */
X         struct mtget stape_getstat_mtget;/* status wrkr thrd status  */
X+#if (defined(BSD) && BSD >= 199306)
X+#define stape_getstat_sstat  stape_getstat_mtget.mt_erreg
X+#else
X #define stape_getstat_sstat stape_getstat_mtget.mt_gstat /* (gstat)  */
X+#endif
X         struct timeval
X                 stape_getstat_query_tod;/* TOD of actual drive query */
X #endif
END-of-patches/patch-bc
echo x - patches/patch-bd
sed 's/^X//' >patches/patch-bd << 'END-of-patches/patch-bd'
X$NetBSD$
X
XLinux tape handling.
X
X--- tapecopy.c.orig    2011-04-19 15:50:10.000000000 +0000
X+++ tapecopy.c
X@@ -242,15 +242,21 @@ static void print_usage (void)
X static int obtain_status (char *devname, int devfd, struct mtget* mtget)
X {
X int rc;                                 /* Return code               */
X+long gstat;
X 
X     rc = ioctl_tape (devfd, MTIOCGET, (char*)mtget);
X     if (rc < 0)
X     {
X+#if (defined(BSD) && BSD >= 199306)
X+      gstat = (mtget->mt_dsreg << 16) | mtget->mt_erreg;
X+#else
X+      gtat = mtget->mt_gstat;
X+#endif
X         if (1
X             && EIO == errno
X             && (0
X-                || GMT_EOD( mtget->mt_gstat )
X-                || GMT_EOT( mtget->mt_gstat )
X+                || GMT_EOD( gstat )
X+                || GMT_EOT( gstat )
X             )
X         )
X             return +1;
X@@ -260,8 +266,8 @@ int rc;                                 
X         return -1;
X     }
X 
X-    if (GMT_EOD( mtget->mt_gstat ) ||
X-        GMT_EOT( mtget->mt_gstat ))
X+    if (GMT_EOD( gstat ) ||
X+        GMT_EOT( gstat ))
X         return +1;
X 
X     return 0;
X@@ -499,6 +505,7 @@ struct mtget    mtget;                  
X struct mtpos    mtpos;                  /* Area for MTIOCPOS ioctl   */
X int             is3590 = 0;             /* 1 == 3590, 0 == 3480/3490 */
X #endif /*defined(EXTERNALGUI)*/
X+long          gstat;
X 
X     INITIALIZE_UTILITY("tapecopy");
X 
X@@ -636,8 +643,13 @@ int             is3590 = 0;             
X         printf (_("HHCTC004I %s tape density code: 0x%lX\n"),
X             (devnamein ? devnamein : devnameout), density);
X 
X-    if (mtget.mt_gstat != 0)
X-        print_status ((devnamein ? devnamein : devnameout), mtget.mt_gstat);
X+#if (defined(BSD) && BSD >= 199306)
X+    gstat = (mtget.mt_dsreg << 16) | mtget.mt_erreg;
X+#else
X+    gstat = mtget.mt_gstat;
X+#endif
X+    if (gstat != 0)
X+        print_status ((devnamein ? devnamein : devnameout), gstat);
X 
X     /* Open the disk file */
X     if (filenamein)
END-of-patches/patch-bd
echo x - patches/patch-be
sed 's/^X//' >patches/patch-be << 'END-of-patches/patch-be'
X$NetBSD$
X
XLinux tape handling.
X
X--- tapedev.h.orig     2011-04-19 15:50:25.000000000 +0000
X+++ tapedev.h
X@@ -535,4 +535,61 @@ extern int  readhdr_omaheaders (DEVBLK *
X /*-------------------------------------------------------------------*/
X // (see SCSITAPE.H)
X 
X+#if defined(BSD) && BSD >= 199306
X+/*-------------------------------------------------------------------*/
X+/* Support for BSD tape                                              */
X+/*-------------------------------------------------------------------*/
X+struct mt_tape_info {
X+      BYTE    t_type;
X+      const char *t_name;
X+};
X+
X+#define MT_TAPE_INFO                                                  \
X+{                                                                     \
X+      {MT_ISUNKNOWN,          "Unknown type of tape device"},         \
X+      {MT_ISQIC02,            "Generic QIC-02 tape streamer"}         \
X+}
X+
X+/* Generic Mag Tape (device independent) status macros for examining
X+ * mt_gstat -- HP-UX compatible.
X+ * There is room for more generic status bits here, but I don't
X+ * know which of them are reserved. At least three or so should
X+ * be added to make this really useful.
X+ */
X+#define GMT_EOF(x)              ((x) & 0x80000000)
X+#define GMT_BOT(x)              ((x) & 0x40000000)
X+#define GMT_EOT(x)              ((x) & 0x20000000)
X+#define GMT_SM(x)               ((x) & 0x10000000)  /* DDS setmark */
X+#define GMT_EOD(x)              ((x) & 0x08000000)  /* DDS EOD */
X+#define GMT_WR_PROT(x)          ((x) & 0x04000000)
X+/* #define GMT_ ? ((x) & 0x02000000) */
X+#define GMT_ONLINE(x)           ((x) & 0x01000000)
X+#define GMT_D_6250(x)           ((x) & 0x00800000)
X+#define GMT_D_1600(x)           ((x) & 0x00400000)
X+#define GMT_D_800(x)            ((x) & 0x00200000)
X+/* #define GMT_ ? ((x) & 0x00100000) */
X+/* #define GMT_ ? ((x) & 0x00080000) */
X+#define GMT_DR_OPEN(x)          ((x) & 0x00040000)  /* door open (no tape) */
X+/* #define GMT_ ? ((x) & 0x00020000) */
X+#define GMT_IM_REP_EN(x)        ((x) & 0x00010000)  /* immediate report mode 
*/
X+/* 16 generic status bits unused */
X+/* SCSI-tape specific definitions */
X+
X+/* Bitfield shifts in the status */
X+#define MT_ST_BLKSIZE_SHIFT 0
X+#define MT_ST_BLKSIZE_MASK 0xffffff
X+#define MT_ST_DENSITY_SHIFT 24
X+#define MT_ST_DENSITY_MASK 0xff000000
X+
X+#define MTSETBLK 20     /* set block length (SCSI) */
X+
X+#define MT_ISUNKNOWN 0x01
X+#define MT_ISQIC02 0x02 
X+
X+#define MTIOCPOS      MTNOP   /* do nothing, status only */
X+#define mtpos         mtget   /* generic status struct, including mt_blkno */
X+#define MTSEEK                MTFSR   /* forward seek record; probably wrong 
*/
X+
X+#endif /* BSD */
X+
X #endif // __TAPEDEV_H__
END-of-patches/patch-be
echo x - patches/patch-bf
sed 's/^X//' >patches/patch-bf << 'END-of-patches/patch-bf'
X$NetBSD$
X
XLinux tape handling.
X
X--- scsitape.c.orig    2010-01-08 22:56:27.000000000 +0000
X+++ scsitape.c
X@@ -1334,6 +1334,19 @@ int locateblk_scsitape ( DEVBLK* dev, U3
X     mtop.mt_count = CSWAP32( mtop.mt_count );   // (host <- guest)
X     mtop.mt_op    = MTSEEK;
X 
X+#if defined(BSD) && BSD >= 199306
X+    /* Find out where we are so we can do a relative seek */
X+    {
X+      struct mtget here;
X+
X+      rc = ioctl_tape( dev->fd, MTIOCGET, (char*)&here );
X+      if (rc >= 0) {
X+          mtop.mt_count -= here.mt_blkno;
X+          mtop.mt_op = MTFSR;
X+      }
X+    }
X+#endif /* BSD */
X+
X     // Ask the actual hardware to do an actual physical locate...
X 
X     if ((rc = ioctl_tape( dev->fd, MTIOCTOP, (char*)&mtop )) < 0)
END-of-patches/patch-bf
exit

-Olaf.
-- 
___ Olaf 'Rhialto' Seibert  -- There's no point being grown-up if you 
\X/ rhialto/at/xs4all.nl    -- can't be childish sometimes. -The 4th Doctor

>Unformatted:
        
        


Home | Main Index | Thread Index | Old Index