You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Wanted to use the ghw.Block() functionality, and noticed on Darwin that it returns no information. I used delve to debug what was happening, and while almost all the disk information was being found, it was getting to this section of code
In summary, because the model number/serial number/vendor retrieval failed, we lost out on all the other information that was found. Two requests, could we populate the information even if this ioreg piece fails? And could we look into why the ioreg piece fails on darwin? I tried to query ioreg but I was not able to find an alternative way to pull this info.
The text was updated successfully, but these errors were encountered:
nice! If I can help in anyway let me know. I don't have another mac to confirm if this is purely an issue with my machine or if it presents on other machines as well. Maybe something changed with Catalina?
I had the same problem so i had a friend run some tests and found this:
The MacBook i have runs on a HDD and diskutil reports the following DevicePath
IODeviceTree:/PCI0@0/SATA@1F,2/PRT0@0/PMP@0
So ioreg gets called with PMP@0 and returns nothing. The library doesn't work here. Note: I ran ioreg by hand with AppleAHCIDiskDriver as name and got the disk model/serial.
The MacBook from my friend uses a SSD and diskutil returns this DevicePath
Hi 馃憢,
Wanted to use the
ghw.Block()
functionality, and noticed on Darwin that it returns no information. I used delve to debug what was happening, and while almost all the disk information was being found, it was getting to this section of codeghw/block_darwin.go
Lines 129 to 136 in e193f94
and
out
was an empty string. This code is supposed to populate this structghw/block_darwin.go
Lines 91 to 96 in e193f94
and when it fails it calls
ghw/block_darwin.go
Lines 140 to 142 in e193f94
which results in the this
continue
clause to be calledghw/block_darwin.go
Lines 248 to 254 in e193f94
As a result, none of this code is called, so nothing ever gets populated
ghw/block_darwin.go
Lines 257 to 293 in e193f94
In summary, because the model number/serial number/vendor retrieval failed, we lost out on all the other information that was found. Two requests, could we populate the information even if this ioreg piece fails? And could we look into why the ioreg piece fails on darwin? I tried to query ioreg but I was not able to find an alternative way to pull this info.
The text was updated successfully, but these errors were encountered: