Skip to content
This repository was archived by the owner on Jul 10, 2025. It is now read-only.

benmcclelland/sgio

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sgio

golang library for issuing SCSI commands with SG_IO ioctl

godoc

See TestUnitReady() for example function using SG_IO

example:

f, err := OpenScsiDevice("/dev/sg0")
if err != nil {
	log.Fatalln(err)
}
defer f.Close()

Fill out SgIoHdr for SCSI command

ioHdr := &SgIoHdr{...}
err := SgioSyscall(f, ioHdr)
if err != nil {
	log.Fatalln(err)
}

err = CheckSense(ioHdr, &senseBuf)
if err != nil {
	log.Fatalln(err)
}

About

golang library for SCSI commands using SG_IO ioctl

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages