blocktest: make script more newbie-friendly

This commit is contained in:
David van Moolenbroek 2012-09-07 14:25:03 +00:00
parent 0e83262042
commit 2fbc9b274b
2 changed files with 7 additions and 7 deletions

View file

@ -7,9 +7,9 @@ devtopair() {
if [ ! -z "$label" ]; then echo "label=$label,minor=`stat -f '%Lr' $1`"; fi if [ ! -z "$label" ]; then echo "label=$label,minor=`stat -f '%Lr' $1`"; fi
} }
# usage: blocktest /dev/cXdY.. "params,for,blocktest" # usage: block_test /dev/cXdY.. "params,for,blocktest"
# runs the blocktest driver on the given device with the given parameters # runs the blocktest driver on the given device with the given parameters
blocktest() { block_test() {
if [ ! -x blocktest ]; then echo "compile blocktest first!" >&2; exit 1; fi if [ ! -x blocktest ]; then echo "compile blocktest first!" >&2; exit 1; fi
if [ ! -b "$1" ]; then echo "$1 is not a block device" >&2; exit 1; fi if [ ! -b "$1" ]; then echo "$1 is not a block device" >&2; exit 1; fi
pair=$(devtopair $1) pair=$(devtopair $1)

View file

@ -5,7 +5,7 @@
# The following commented-out examples of how to run blocktest for certain # The following commented-out examples of how to run blocktest for certain
# driver and device pairs. The syntax of the calls is: # driver and device pairs. The syntax of the calls is:
# #
# blocktest <device> <parameters> # block_test <device> <parameters>
# #
# <device> is the path to a device to run blocktest on. This may be a full # <device> is the path to a device to run blocktest on. This may be a full
# disk, a partition, or a subpartition. If possible, give blocktest the whole # disk, a partition, or a subpartition. If possible, give blocktest the whole
@ -47,16 +47,16 @@
# AT_WINI ATA TEST (for IDE disk devices) # AT_WINI ATA TEST (for IDE disk devices)
#blocktest /dev/c0d1 "rw,sector=512,min_read=512,element=2,max=16777216" #block_test /dev/c0d1 "rw,sector=512,min_read=512,element=2,max=16777216"
# AT_WINI ATAPI TEST (for IDE CD-ROM devices) # AT_WINI ATAPI TEST (for IDE CD-ROM devices)
#blocktest /dev/c0d2 "ro,sector=2048,min_read=2,element=2,max=16777216" #block_test /dev/c0d2 "ro,sector=2048,min_read=2,element=2,max=16777216"
# AHCI ATA TEST (for SATA disk devices) # AHCI ATA TEST (for SATA disk devices)
#blocktest /dev/c2d0 "rw,sector=512,min_read=2,element=2,max=4194304" #block_test /dev/c2d0 "rw,sector=512,min_read=2,element=2,max=4194304"
# AHCI ATAPI TEST (for SATA CD-ROM devices) # AHCI ATAPI TEST (for SATA CD-ROM devices)
#blocktest /dev/c2d1 "ro,sector=2048,min_read=2,element=2,max=4194304" #block_test /dev/c2d1 "ro,sector=2048,min_read=2,element=2,max=4194304"