�&ǐk�@'bJ�h�ۊL'}T� :��'2�Z#$��n�a��� �>a��`��_3d�Qpt�/�P -��#5�,�M��� �pA:©�q�����NW��ډ�A���� �9nʺج���� �TSM��{J6?7��r�@�\����D��� �׶���s�f�TJj?"��D��`?��̒� b�#�%�C*v�$�{�$����5Ծ�F�s��y�e/8��h-�f�̰&(����Gj�L:U� 2�� ����v�_k����Y��gp,�k�WF�R������_C�R��N@���R�@�ߔ?A�w9���F("iNa-S���Q�o�3tDMLh*�#4k�T/iQ��Y*�G��m����)��8�hBm/�I�,g�ﯖ���Z��}�Cz�q@´��d.����L�ŕ�,��1�Z�܌�: ̪���F+J-'��c�tvJ8��]Q-��b��y �6;*J`r_�d ��'�G ~p��)'�C,�%F��E(��2�k�����lР�z�!�=t ��_�0��f7��� ;�p�|�U �%" echo " where: -h, --help print usage message" echo " -L, --log append stderr to 'scsi_satl.err'" echo " -q, --quiet suppress some output" echo " -v, --verbose more verbose output" echo "" echo "Check for SCSI to ATA Translation Layer (SATL) support" } opt="$1" while test ! -z "$opt" -a -z "${opt##-*}"; do opt=${opt#-} case "$opt" in h|-help) usage ; exit 1 ;; L|-log) let log=$log+1 ;; q|-quiet) let quiet=$quiet+1 ;; v|-verbose) verbose="-v" ;; *) echo "Unknown option: -$opt " ; exit 1 ;; esac shift opt="$1" done if [ $# -lt 1 ] then usage exit 1 fi for command in "sg_inq" "sg_vpd" "sg_vpd -p di" "sg_vpd -p ai" "sg_luns" \ "sg_turs" "sg_requests -s" "sg_senddiag -t" "sg_modes -a" \ "sg_sat_identify" do if [ $quiet -eq 0 ] then echo "$command" "$1" fi if [ $log -eq 0 ] then if [ $verbose ] then $command $verbose "$1" > /dev/null else $command "$1" > /dev/null 2>> /dev/null fi else $command $verbose "$1" > /dev/null 2>> scsi_satl.err fi res=$? case "$res" in 0) ;; 1) echo " syntax error" ; let syntax=$syntax+1 ;; 2) echo " not ready" ; let not_ready=$not_ready+1 ;; 3) echo " medium error" ; let medium=$medium+1 ;; 5) echo " illegal request, general" ; let illeg_req=$illeg_req+1 ;; 6) echo " unit attention" ; let unit_attention=$unit_attention+1 ;; 9) echo " illegal request, invalid opcode" ; let inv_opcode=$inv_opcode+1 ;; 11) echo " aborted command" ; let aborted_command=$aborted_command+1 ;; 15) echo " file error with $1 " ; let file_err=$file_err+1 ;; 20) echo " no sense" ; let other_err=$other_err+1 ;; 21) echo " recovered error" ; let recovered=$recovered+1 ;; 33) echo " timeout" ; let timeout=$timeout+1 ;; 97) echo " response fails sanity" ; let sanity=$sanity+1 ;; 98) echo " other SCSI error" ; let other_err=$other_err+1 ;; 99) echo " other error" ; let other_err=$other_err+1 ;; *) echo " unknown exit status for sg_inq: $res" ; let other_err=$other_err+1 ;; esac done echo "" let total_bad_err=$file_err+$inv_opcode+$illeg_req+$medium+$aborted_command let total_bad_err+=$other_err+$recovered+$sanity+$syntax+$timeout let total_allow_err=$not_ready+$unit_attention echo "total number of bad errors: $total_bad_err " if [ $total_allow_err -gt 0 ] then echo "total number of allowable errors: $total_allow_err " fi exit $total_bad_err