diff --git a/smart-status/smart-status-lib.pl b/smart-status/smart-status-lib.pl index eeb9c6941..107965209 100755 --- a/smart-status/smart-status-lib.pl +++ b/smart-status/smart-status-lib.pl @@ -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; }