#! /bin/sh
# 5799-WZQ (C) COPYRIGHT IBM CORPORATION 1987,1988
# LICENSED MATERIALS - PROPERTY OF IBM
# REFER TO COPYRIGHT INSTRUCTIONS FORM NUMBER G120-2083
# $Header:sizeck.sh 12.0$ 
# $ACIS:sizeck.sh 12.0$ 
# $Source: /ibm/acis/usr/sys/dist/etc/RCS/sizeck.sh,v $ 
#
# usage: sizeck device limit
#	return 0 if device's total capacity is > limit
#	return 1 if device's total capacity is < limit

case $# in
2)	device=$1
	limit=$2;;
*)	echo "usage: sizeck device limit" >&2
	exit 2;;
esac

size=0
blocksize=4
start=8
ncyl=12
ntrack=16
nsector=20
name=24

/etc/syscall ioctl 0 0x40286402 \&0 \; \
	= \&$size ! 4 \; = \$ \< $limit \; exit \$ < $device
