aboutsummaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
authorcvs2svn <cvs2svn@FreeBSD.org>1996-01-01 11:01:15 +0000
committercvs2svn <cvs2svn@FreeBSD.org>1996-01-01 11:01:15 +0000
commita3ab491d642b34f2d3efbc0562abc8e79b38ce09 (patch)
tree959df5086a97d16c04b83842650d6ee1f3de4522 /sbin
parent4e2d078f4fc7fe46c0e3b0f1256c92e971891c67 (diff)
This commit was manufactured by cvs2svn to create tagupstream/2.1.0release/2.1.0
'RELENG_2_1_0_RELEASE'.
Notes
Notes: svn path=/stable/2.1/; revision=13148 svn path=/release/2.1.0/; revision=13149; tag=release/2.1.0
Diffstat (limited to 'sbin')
-rw-r--r--sbin/scsiformat/scsiformat.sh143
1 files changed, 0 insertions, 143 deletions
diff --git a/sbin/scsiformat/scsiformat.sh b/sbin/scsiformat/scsiformat.sh
deleted file mode 100644
index 5c6dd88bf67c..000000000000
--- a/sbin/scsiformat/scsiformat.sh
+++ /dev/null
@@ -1,143 +0,0 @@
-#!/bin/sh
-#
-# Copyright (c) 1995 Peter Dufault
-#
-# All rights reserved.
-#
-# This program is free software.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-#
-# THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY EXPRESS OR
-# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-# IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-# $Id$
-#
-# scsiformat [-wq] [-p page-control] raw-device-name
-#
-
-PATH="/sbin:/usr/sbin:/bin:/usr/bin"; export PATH
-
-READONLY=yes
-QUIET=no
-RAW=
-PAGE=0
-
-usage()
-{
- echo "Usage: scsiformat [-wq] [-p page-control] raw-device-name" 1>&2
- exit 2
-}
-
-while getopts "qwp:" option
-do
- case $option in
- q)
- QUIET=yes
- ;;
- w)
- READONLY=no
- ;;
- p)
- case $OPTARG in
- c)
- PAGE=0
- ;;
- d)
- PAGE=2
- ;;
- s)
- PAGE=3
- ;;
- v)
- PAGE=1
-echo "*** note: for variable parameters, 1-bit means 'can write here'"
- ;;
- *)
- usage
- ;;
- esac
- ;;
- ?)
- usage
- ;;
- esac
-done
-
-shift $(($OPTIND - 1))
-
-if [ $# -ne 1 ] ; then
- usage
-fi
-
-RAW=$1
-
-if [ "x$RAW" = "x" ] ; then
- usage
-fi
-
-if expr "$RAW" : 'sd[0-9][0-9]*$' > /dev/null ; then
- # generic disk name given, convert to control device name
- RAW="/dev/r${RAW}.ctl"
-fi
-
-scsi -f $RAW -v -c "12 0 0 0 v 0" 96 -i 96 "s8 z8 z16 z4" || exit $?
-
-if [ "$QUIET" = "no" ] ; then
- scsi -f $RAW \
--v -c "1A 0 v:2 4:6 0 64 0" $PAGE \
--i 72 "{Mode data length} i1 \
-{Medium type} i1 \
-{Device Specific Parameter} i1 \
-{Block descriptor length} i1 \
-{Density code} i1 \
-{Number of blocks} i3 \
-{Reserved} i1 \
-{Block length} i3 \
-{PS} b1 \
-{Reserved} b1 \
-{Page code} b6 \
-{Page length} i1 \
-{Number of Cylinders} i3 \
-{Number of Heads} i1 \
-{Starting Cylinder-Write Precompensation} i3 \
-{Starting Cylinder-Reduced Write Current} i3 \
-{Drive Step Rate} i2 \
-{Landing Zone Cylinder} i3 \
-{Reserved} b6 \
-{RPL} b2 \
-{Rotational Offset} i1 \
-{Reserved} i1 \
-{Medium Rotation Rate} i2 \
-{Reserved} i1 \
-{Reserved} i1 " || exit $?
-fi # !quiet
-
-if [ "$READONLY" = "no" ]
-then
- # grace period, last chance to hit INTR
- echo -n "Three seconds until format begins."
- sleep 1
- echo -n "."
- sleep 1
- echo -n "."
- sleep 1
- # formatting may take a huge amount of time, set timeout to 2 hours
- echo " Formatting... this may take a while."
- scsi -s 7200 -f $RAW -c "4 0 0 0 0 0"
-fi