Jamie Cameron
2022-06-10 22:49:08 -07:00
parent 743bb67414
commit 24d1a476fb

View File

@ -297,13 +297,16 @@ if (&get_smart_version() > 5.0) {
# Check support
local $out = &backquote_command(
"$config{'smartctl'} $extra_args -i $qd 2>&1");
"$config{'smartctl'} $extra_args -i $qd 2>&1");
if ($out =~ /SMART\s+support\s+is:\s+Available/i) {
$rv{'support'} = 1;
}
elsif ($out =~ /Device\s+supports\s+SMART/i) {
$rv{'support'} = 1;
}
elsif ($out =~ /NVMe\s+Version:/i) {
$rv{'support'} = 1;
}
else {
$rv{'support'} = 0;
}
@ -317,6 +320,9 @@ if (&get_smart_version() > 5.0) {
# Added to match output from RHEL5
$rv{'enabled'} = 1;
}
elsif ($out =~ /NVMe\s+Version:/i) {
$rv{'enabled'} = 1;
}
else {
# Not enabled!
$rv{'enabled'} = 0;
@ -545,9 +551,6 @@ if ($drive && defined($drive->{'subdisk'})) {
elsif ($config{'ata'}) {
$extra_args .= " -d ata";
}
else {
$extra_args .= " -d auto";
}
return $extra_args;
}