Add Linux mdraid health monitoring (#1750)

This commit is contained in:
VACInc
2026-02-27 13:42:47 -05:00
committed by GitHub
parent 69fdcb36ab
commit 02c1a0c13d
7 changed files with 393 additions and 17 deletions

View File

@@ -199,19 +199,6 @@ func readHexByteFile(path string) (uint8, bool) {
return b, ok
}
func readStringFile(path string) string {
content, _ := readStringFileOK(path)
return content
}
func readStringFileOK(path string) (string, bool) {
b, err := os.ReadFile(path)
if err != nil {
return "", false
}
return strings.TrimSpace(string(b)), true
}
func hasEmmcHealthFiles(deviceDir string) bool {
entries, err := os.ReadDir(deviceDir)
if err != nil {