D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
lib
/
scsi
/
Filename :
error
back
Copy
#!/usr/bin/wish -f # Copyright 1993 Yggdrasil Computing, Incorporated # You may copy this file according to the terms and conditions of version 2 # of the GNU General Public License as published by the Free Software # Foundation. frame .h label .h.info -bitmap info -bg pink message .h.message -width 400 -bg pink -text \ {Read-Write Error Recovery Page configuration.} pack .h.info .h.message -padx 10 -side left pack .h -pady 10 source /usr/lib/scsi/generic # Here we set the bits that depend upon the menu we are in set button_list { awre arre tb rc eer per dte dcr } set text_list { readretry corrspan headoffset datastrobe writeretry recoverytime} set text_descriptions {"Read Retry Count " "Correction Span (bits) " "Head Offset Count " "Data Strobe Offset Count " "Write Retry Count " "Recovery Time Limit (ms)" } set switch {-e} set label_width 25 set text_width 10 frame .err_buttons frame .col1 frame .col2 frame .col3 frame .col4 frame .f1 frame .f2 frame .f3 generate_textboxes checkbutton .awre -text "AWRE" checkbutton .arre -text "ARRE" checkbutton .tb -text "TB" checkbutton .rc -text "RC" checkbutton .eer -text "EER" -command { check_trykey } checkbutton .per -text "PER" -command { check_trykey } checkbutton .dte -text "DTE" -command { check_trykey } checkbutton .dcr -text "DCR" -command { check_trykey } pack .awre .eer -in .col1 pack .arre .per -in .col2 pack .tb .dte -in .col3 pack .rc .dcr -in .col4 pack .col1 .col2 .col3 .col4 -in .err_buttons -side left -padx 3m pack .err_buttons pack .readretry .corrspan .headoffset -in .f1 -pady 10 -anchor w pack .datastrobe .writeretry .recoverytime -in .f2 -pady 10 -anchor w pack .f1 .f2 -in .f3 -side left -padx 3m -pady 3m pack .f3 -padx 3m -pady 3m proc check_trykey { } { global eer global per global dte global dcr set valid { 1 1 0 0 1 1 1 1 1 0 0 0 1 0 1 0 } set r1 0 if { $eer == 1 } then { set r1 [expr $r1+8]} if { $per == 1 } then { set r1 [expr $r1+4]} if { $dte == 1 } then { set r1 [expr $r1+2]} if { $dcr == 1 } then { set r1 [expr $r1+1]} if { [ string compare [lindex $valid $r1] "0" ] == 0} then { .buttons.apply configure -state disabled } else { .buttons.apply configure -state normal } } read_page $argv "-X" read_modifiable $argv check_trykey