Skip to content

fix(collector): ignore bit 6 in smartctl exit-code during detect#43

Merged
Starosdev merged 1 commit into
developfrom
fix/upstream-pr-794-ignore-bit6-exitcode
Dec 1, 2025
Merged

fix(collector): ignore bit 6 in smartctl exit-code during detect#43
Starosdev merged 1 commit into
developfrom
fix/upstream-pr-794-ignore-bit6-exitcode

Conversation

@Starosdev

Copy link
Copy Markdown
Owner

Summary

Smartctl exit code bit 6 indicates "Device error log contains records of errors" which is informational and doesn't mean the device info retrieval failed. This fix ignores bit 6 (masking with 0xBF) to prevent false failures during device detection when drives have historical errors logged.

Origin

Changes

  • Adds exit code handling in SmartCtlInfo() to mask bit 6
  • Logs a warning instead of failing when only bit 6 is set
  • Continues processing device info even with historical error logs

Test Plan

  • Verify drives with error logs in history are still detected
  • Verify actual device errors still cause failures
  • Check collector logs show warning message for bit 6 exits

@Starosdev Starosdev added this to the v1.1.0 - Bug Fixes milestone Nov 30, 2025
@Starosdev Starosdev added bug Something isn't working upstream-pr Upstream PR to merge labels Nov 30, 2025
@Starosdev Starosdev self-assigned this Nov 30, 2025
Smartctl exit code bit 6 indicates "Device error log contains records of errors"
which is informational and doesn't mean the device info retrieval failed.
This fix ignores bit 6 (masking with 0xBF) to prevent false failures during
device detection when drives have historical errors logged.
@Starosdev
Starosdev force-pushed the fix/upstream-pr-794-ignore-bit6-exitcode branch from 88119e1 to 735fe2e Compare November 30, 2025 06:42
@Starosdev Starosdev changed the title fix(collector): ignore bit 6 in smartctl exit-code during detect (upstream PR #794) fix(collector): ignore bit 6 in smartctl exit-code during detect Nov 30, 2025
@Starosdev
Starosdev merged commit 9042676 into develop Dec 1, 2025
11 of 13 checks passed
@Starosdev
Starosdev deleted the fix/upstream-pr-794-ignore-bit6-exitcode branch January 19, 2026 20:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working upstream-pr Upstream PR to merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant