mirror of
https://github.com/morgan9e/macos-stats
synced 2026-04-14 00:04:15 +09:00
feat: temporarily disabled NVMeSmart reader because of a problem with the new macOS Sonoma
This commit is contained in:
@@ -61,7 +61,6 @@ internal class CapacityReader: Reader<Disks> {
|
||||
|
||||
if let path = d.path {
|
||||
self.list.updateFreeSize(idx, newValue: self.freeDiskSpaceInBytes(path))
|
||||
self.list.updateSMARTData(idx, smart: self.getSMARTDetails(for: BSDName))
|
||||
}
|
||||
|
||||
continue
|
||||
@@ -72,7 +71,6 @@ internal class CapacityReader: Reader<Disks> {
|
||||
d.free = self.freeDiskSpaceInBytes(path)
|
||||
d.size = self.totalDiskSpaceInBytes(path)
|
||||
}
|
||||
d.smart = self.getSMARTDetails(for: BSDName)
|
||||
self.list.append(d)
|
||||
self.list.sort()
|
||||
}
|
||||
@@ -162,13 +160,15 @@ internal class CapacityReader: Reader<Disks> {
|
||||
pluginInterface?.pointee?.pointee.QueryInterface(pluginInterface, CFUUIDGetUUIDBytes(kIONVMeSMARTInterfaceID), $0) ?? KERN_NOT_FOUND
|
||||
}
|
||||
}
|
||||
|
||||
guard result == kIOReturnSuccess else { return nil }
|
||||
defer {
|
||||
if smartInterface != nil {
|
||||
_ = pluginInterface?.pointee?.pointee.Release(smartInterface)
|
||||
}
|
||||
}
|
||||
|
||||
guard result == KERN_SUCCESS, let smart = smartInterface?.pointee else { return nil }
|
||||
guard let smart = smartInterface?.pointee else { return nil }
|
||||
var smartData: nvme_smart_log = nvme_smart_log()
|
||||
guard smart.pointee.SMARTReadData(smartInterface, &smartData) == kIOReturnSuccess else { return nil }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user