Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Clarify error codepath in smart.Open() function
SATA/SCSI codepath does not need to close as OpenSata/OpenScsi either returns a valid device (and it then passed up to the user) or returns error and the device is nil. The only case that requires a special handling is OpenNVMe() that just really opening a file. We later use Identify() to make sure it support NVME SMART interface. If file opened succesfully but IDENTIFY is not supoprted then it considered a error codepath and device should be closed. Fixes #6
- Loading branch information