# Functions

CheckBinaryPerm invokes the linux CAPGET syscall which checks for necessary capabilities required for a binary to access a device.
Ioctl function executes an ioctl command on the specified file descriptor ioctl (an abbreviation of input/output control) is a system call for device-specific input/output operations and other operations which cannot be expressed by regular system calls.
MockScsiBasicDiskInfo is used to fetch basic disk details for a scsi disk.
MSignificantBit finds the most significant bit set in a uint.
NewErrorCollector returns a pointer to the ErrorCollector.

# Constants

ATA command being used.
Constants being used as keys for sending map of errors.
Constants being used by switch case for returning disk details.
Constants being used by switch case for returning disk details.
Constants being used by switch case for returning disk details.
Constants being used by switch case for returning disk details.
Constants being used by switch case for returning disk details.
DefaultTimeout in millisecs.
Constants being used as keys for sending map of errors.
Constants being used by switch case for returning disk details.
Minimum length of standard INQUIRY response.
Constants being used by switch case for returning disk details.
Constants being used by switch case for returning disk details.
Constants being used by switch case for returning disk details.
Constants being used by switch case for returning disk details.
Constants being used as keys for sending map of errors.
ata passthru command.
Constants being used as keys for sending map of errors.
Constants being used as keys for sending map of errors.
inquiry command.
mode sense command.
read capacity (10) command.
read capacity (16) command.
read capacity (16) service action.
Constants being used as keys for sending map of errors.
Constants being used by switch case for returning disk details.
SCSI READ command.
SCSI Test Unit Ready command.
SCSI WRITE command.
relevant to indirect IO (otherwise it is treated like SGDxferFromDev).
no sense, host nor driver "noise" or error.
indicates whether some error or status field is non-zero.
scsi generic ioctl command.
Constants being used by switch case for returning disk details.
Constants being used by switch case for returning disk details.
Constants being used by switch case for returning disk details.

# Variables

ATACSAttr is the list of attributes fetched using ATACSPage.
A ByteOrder specifies how to convert byte sequences into 16-, 32-, or 64-bit unsigned integers.
ScsiInqAttr is the list of attributes fetched by SCSI Inquiry command.
SimpleSCSIAttr is the list of attributes fetched by simple SCSI commands such as readCapacity,etc.

# Structs

ATACSPage struct is an ATA IDENTIFY DEVICE struct.
ATADiskAttr is the struct for disk attributes that are specific to ATA disks.
BasicDiskAttr is the structure being used for returning basic disk details.
DiskAttr is struct being used for returning all the available disk details (both basic and smart) For now, only basic disk attr are being fetched so it is returning only basic attrs.
ErrorCollector Struct is a struct for map of errors.
Identifier (devPath such as /dev/sda,etc) is an identifier for smart probe.
InquiryResponse is used for parsing response fetched by sending a scsi inquiry command to a scsi device Here underscore (_) is used to skip the words which we don't want to parse as of now..
MockOsDiskDetails struct contains the basic details of the disk.
SATA is a simple wrapper around an embedded SCSIDevice type, which handles sending ATA commands via SCSI pass-through (SCSI-ATA Translation).
SCSIDev represents a particular scsi device with device name and file descriptor.
SmartDiskAttr is the structure defined for smart disk attrs (Note : Not being used yet).

# Interfaces

Dev is the top-level device interface.
DevBasicDiskInfo interface implements getBasicDiskInfo method for getting all the available details for a particular disk device.
DevBasicinfoByAttr interface implements getBasicDiskInfoByAttr method for getting particular attribute detail of a disk device.
DevClose interface implements close method for closing a disk device.
DevOpen interface implements open method for opening a disk device.

# Type aliases

CDB10 is an array of 10 byte.
CDB16 is an array of 16 byte.
CDB6 is an array of 6 byte.