Re: [go-nuts] [HELP] How do I read SMART data from disk?

2017-05-13 Thread daniel . swarbrick
I realise this is a very old thread, but I am in the early stages of writing a pure Go library for reading SMART attributes from HDDs / SSDs. So far it works for simple SCSI block devices (i.e., those that have a sd* device name) via SCSI pass-through, and I am in the process of adding support

[go-nuts] Working with ioctls, structs containing uintptr, and "((packed))"

2017-01-26 Thread daniel . swarbrick
Hello, I'm trying to call Linux SCSI generic ioctls from Go, ideally without resorting to cgo, and have hit a few snags. I have ported the sg_io_hdr_t struct () to Go, and according to http://golang-sizeof.tips, it is the same size as sizeof(sg_io_hdr_t) in C, and does not contain any unexpect