aboutsummaryrefslogtreecommitdiff
path: root/emulators/hercules
diff options
context:
space:
mode:
authorErwin Lansing <erwin@FreeBSD.org>2006-11-15 20:23:48 +0000
committerErwin Lansing <erwin@FreeBSD.org>2006-11-15 20:23:48 +0000
commit938c732c1135bf6a2e4363919e7bbcb9bbb0dab6 (patch)
treef1d205c78f6248bde7f93c5183d547062dfd6a99 /emulators/hercules
parenta2ef5354575d999d985c4b9e5a499344b006aa86 (diff)
downloadports-938c732c1135bf6a2e4363919e7bbcb9bbb0dab6.tar.gz
ports-938c732c1135bf6a2e4363919e7bbcb9bbb0dab6.zip
Fix dasdlist utility
PR: 105148 Submitted by: trasz <trasz@pin.if.uz.zgora.pl> Approved by: bz (maintainer)
Notes
Notes: svn path=/head/; revision=177346
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