-
Notifications
You must be signed in to change notification settings - Fork 0
/
extent_check
executable file
·73 lines (63 loc) · 1.57 KB
/
extent_check
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
###############################################################################
#
# File: extent_check
# RCS: $Header:$
# Description: Checks for figures beyond R1330 in design
# Author: Floyd Moore
# Created: Thu May 22 14:44:06 MDT 1997
# Modified:
# Language: Indented Text
# Package: N/A
# Status: Experimental (Do Not Distribute)
#
# (C) Copyright 1997, Hewlett-Packard ESL, all rights reserved.
#
###############################################################################
program=`basename $0`
usage()
{
echo "Usage: ${program} Block" >&2
exit 2
}
PATH=$PATH:$CBROOT/lib/util # Just in case
block=""
for opt in $*
do
case $1 in
-x) debug="set -x"; shift;;
--) shift; break;;
-*) usage; shift;;
esac
done
block=$1
blockpath=`get_dir $block`
if [ -z "$blockpath" ]
then
echo "Bad blockname: $block"
exit -1
fi
if [ ! -f art_$ICPROCESS/trantor.db ]
then
echo "Block does not have a trantor.db available"
exit -1
fi
cd $blockpath/art_i856
export SCRIPTPATH="$SCRIPTPATH:/nfs/hpesctr/mnt/trdb1/cuda/scripts"
script="extent_check.tran"
#debug="set -x"
trantor -f -c "$debug;$script $block"
status=$?
if [ $status -ne 0 ]; then
if [ $status -eq 1 ]
then
echo " Extent check failed. Block not located at 0,0."
elif [ $status -eq 2 ]
then
echo " Extent check failed. Please review the errors in /tmp/pig.out"
echo " (an archive file)."
echo " Remember you will need to re-run make_drc to get a new trantor.db"
echo " prior to re-running this script."
fi
exit 3
fi
exit 0