aboutsummaryrefslogtreecommitdiffstats
path: root/emulators/hercules
diff options
context:
space:
mode:
authorerwin <erwin@FreeBSD.org>2006-11-16 04:23:48 +0800
committererwin <erwin@FreeBSD.org>2006-11-16 04:23:48 +0800
commitf2b2f429c14541dd1a25a07eabbe592212640f6e (patch)
tree1c495fcf6616d82ece03376f725a1dbe6606efe3 /emulators/hercules
parent0018489297ec82d341750253aa025ee7097c47a2 (diff)
downloadfreebsd-ports-gnome-f2b2f429c14541dd1a25a07eabbe592212640f6e.tar.gz
freebsd-ports-gnome-f2b2f429c14541dd1a25a07eabbe592212640f6e.tar.zst
freebsd-ports-gnome-f2b2f429c14541dd1a25a07eabbe592212640f6e.zip
Fix dasdlist utility
PR: 105148 Submitted by: trasz <trasz@pin.if.uz.zgora.pl> Approved by: bz (maintainer)
Diffstat (limited to 'emulators/hercules')
-rw-r--r--emulators/hercules/Makefile1
-rw-r--r--emulators/hercules/files/patch-util-dasdlist36
2 files changed, 37 insertions, 0 deletions
diff --git a/emulators/hercules/Makefile b/emulators/hercules/Makefile
index c3f87f1dc78e..106859d4d641 100644
--- a/emulators/hercules/Makefile
+++ b/emulators/hercules/Makefile
@@ -7,6 +7,7 @@
PORTNAME= hercules
PORTVERSION= 3.04
+PORTREVISION= 1
CATEGORIES= emulators
MASTER_SITES= http://www.conmicro.cx/hercules/
diff --git a/emulators/hercules/files/patch-util-dasdlist b/emulators/hercules/files/patch-util-dasdlist
new file mode 100644
index 000000000000..3e38eae338d2
--- /dev/null
+++ b/emulators/hercules/files/patch-util-dasdlist
@@ -0,0 +1,36 @@
+--- util/dasdlist.orig Tue Nov 14 10:19:08 2006
++++ util/dasdlist Tue Nov 14 10:48:16 2006
+@@ -1,4 +1,4 @@
+-#!/bin/bash
++#!/bin/sh
+ #
+ # This command prints a track from a CKD DASD image file.
+ # It uses the GNU Octal Dump (od) command to firstly obtain
+@@ -22,7 +22,7 @@ fi
+ #
+ # Check the first 8 bytes of the header for valid CKD DASD image file
+ #
+-ckdid=`od -An -s --read-bytes=8 $filename`
++ckdid=`hexdump -n 8 -e '"%_p"' $filename`
+ if [ $ckdid != "CKD_P370" ]; then
+ echo "File $filename is not a CKD DASD image file"
+ exit 2
+@@ -31,8 +31,8 @@ fi
+ #
+ # The next 8 bytes contain the tracks/cyl and track length constants
+ #
+-heads=`od -An -tu4 --skip-bytes=8 --read-bytes=4 $filename`
+-trklen=`od -An -tu4 --skip-bytes=12 --read-bytes=4 $filename`
++heads=`od -An -tu4 -j 8 -N 4 $filename`
++trklen=`od -An -tu4 -j 12 -N 4 $filename`
+
+ echo "$filename $(($heads)) trks/cyl, $(($trklen)) bytes/trk"
+
+@@ -54,5 +54,5 @@ num=$(($trklen))
+ # Dump the requested track
+ #
+ echo "$filename Cyl $(($cyl)) Head $(($head))"
+-echo "od -Ax -tx1 --skip-bytes=$offset --read-bytes=$num $filename"
+-od -Ax -tx1 --skip-bytes=$offset --read-bytes=$num $filename
++echo "od -Ax -tx1 -j $offset -N $num $filename"
++od -Ax -tx1 -j $offset -N $num $filename