4 require './smart-status-lib.pl';
6 $mode = $in{'short'} ? "short" :
7 $in{'ext'} ? "ext" : "data";
8 &ui_print_header(undef, $text{$mode.'_title'}, "");
10 @drives = &list_smart_disks_partitions();
11 ($d) = grep { $_->{'device'} eq $in{'drive'} &&
12 $_->{'subdisk'} == $in{'subdisk'} } @drives;
13 print &text($mode."_doing", $d->{'desc'}),"\n";
14 if ($mode eq "short") {
15 ($ok, $out) = &short_test($in{'drive'}, $d);
17 elsif ($mode eq "ext") {
18 ($ok, $out) = &ext_test($in{'drive'}, $d);
20 elsif ($mode eq "data") {
21 ($ok, $out) = &data_test($in{'drive'}, $d);
23 print "<pre>$out</pre>\n";
25 print $text{$mode."_ok"},"<p>\n";
28 print $text{$mode."_failed"},"<p>\n";
31 &ui_print_footer("index.cgi?drive=$in{'drive'}", $text{'index_return'});