1#!/bin/sh 2# $FreeBSD$ 3 4# 5# About: 6# This script implements a simple USB enumeration test 7# 8# Usage: 9# ./usb_enum.t ugenX.Y 10# 11 12echo "1..100" 13 14if [ "$1" = "" ]; then 15# First Root HUB 16DEV="ugen0.1" 17else 18# Custom device 19DEV="$1" 20fi 21 22for N in $(jot 100 1) 23do 24if [ -c /dev/$DEV ] && [ -r /dev/$DEV ] && usbconfig -d $DEV reset ; then 25echo "ok $N" 26else 27echo "not ok $N" 28fi 29done 30 31