()
| 48 | } |
| 49 | |
| 50 | func deviceModelLinux() string { |
| 51 | for _, path := range []string{ |
| 52 | // First try the Synology-specific location. |
| 53 | // Example: "DS916+-j" |
| 54 | "/proc/sys/kernel/syno_hw_version", |
| 55 | |
| 56 | // Otherwise, try the Devicetree model, usually set on |
| 57 | // ARM SBCs, etc. |
| 58 | // Example: "Raspberry Pi 4 Model B Rev 1.2" |
| 59 | // Example: "WD My Cloud Gen2: Marvell Armada 375" |
| 60 | "/sys/firmware/devicetree/base/model", // Raspberry Pi 4 Model B Rev 1.2" |
| 61 | } { |
| 62 | b, _ := os.ReadFile(path) |
| 63 | if s := strings.Trim(string(b), "\x00\r\n\t "); s != "" { |
| 64 | return s |
| 65 | } |
| 66 | } |
| 67 | return "" |
| 68 | } |
| 69 | |
| 70 | func getQnapQtsVersion(versionInfo string) string { |
| 71 | for field := range strings.FieldsSeq(versionInfo) { |
nothing calls this directly
no test coverage detected
searching dependent graphs…