mirror of
https://git.FreeBSD.org/ports.git
synced 2025-02-05 11:35:01 +00:00
37 lines
1.2 KiB
Plaintext
37 lines
1.2 KiB
Plaintext
--- 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
|