浏览代码

Added support for smartctl in arm64

Toby Chui 3 年之前
父节点
当前提交
c4fcc03fb6
共有 1 个文件被更改,包括 4 次插入1 次删除
  1. 4 1
      mod/disk/smart/smart.go

+ 4 - 1
mod/disk/smart/smart.go

@@ -130,9 +130,12 @@ func getBinary() string {
 	if runtime.GOOS == "windows" {
 	if runtime.GOOS == "windows" {
 		return ".\\system\\disk\\smart\\win\\smartctl.exe"
 		return ".\\system\\disk\\smart\\win\\smartctl.exe"
 	} else if runtime.GOOS == "linux" {
 	} else if runtime.GOOS == "linux" {
-		if runtime.GOARCH == "arm" || runtime.GOARCH == "arm64" {
+		if runtime.GOARCH == "arm" {
 			return "./system/disk/smart/linux/smartctl_armv6"
 			return "./system/disk/smart/linux/smartctl_armv6"
 		}
 		}
+		if runtime.GOARCH == "arm64" {
+			return "./system/disk/smart/linux/smartctl_arm64"
+		}
 		if runtime.GOARCH == "386" || runtime.GOARCH == "amd64" {
 		if runtime.GOARCH == "386" || runtime.GOARCH == "amd64" {
 			return "./system/disk/smart/linux/smartctl_i386"
 			return "./system/disk/smart/linux/smartctl_i386"
 		}
 		}