dualfroz ab149ea5d1 fix #6405: disks: smart: parse ATA attributes with additional flags
In its brief output format, smartctl prints the attribute flags as six
characters, followed by a seventh one which is a '+' if any other flag
bits are set and a space otherwise, for example:

  5 Reallocated_Sector_Ct   ------+  100   100   050    -    0

The regex for the ATA attributes only accepted exactly six non-space
characters for the flags, so such attribute lines were skipped. For
drives that set those other bits on all attributes, like the SATA SSD
from the bug report, no SMART attributes showed up at all and the
wearout could not be determined either.

Accept an optional '+' after the flags and add the output from the
bug report as test case.

Signed-off-by: Michal Fox <me@dualfroz.com>
2026-10-02 16:56:44 +02:00
S
Description
My contributions to proxmox-git/pve-storage: 8 commits
101 KiB
0 Stars 1 Watchers 0 Forks
Languages
Perl 100%