refactor: Inject mtio package to allow for remote implementation
This commit is contained in:
@@ -1,9 +1,7 @@
|
||||
package hardware
|
||||
|
||||
import (
|
||||
"github.com/pojntfx/stfs/internal/mtio"
|
||||
)
|
||||
import "github.com/pojntfx/stfs/pkg/config"
|
||||
|
||||
func Eject(fd uintptr) error {
|
||||
return mtio.EjectTape(fd)
|
||||
func Eject(mt config.MagneticTapeIO, fd uintptr) error {
|
||||
return mt.EjectTape(fd)
|
||||
}
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
package hardware
|
||||
|
||||
import (
|
||||
"github.com/pojntfx/stfs/internal/mtio"
|
||||
)
|
||||
import "github.com/pojntfx/stfs/pkg/config"
|
||||
|
||||
func Tell(fd uintptr) (int64, error) {
|
||||
return mtio.GetCurrentRecordFromTape(fd)
|
||||
func Tell(mt config.MagneticTapeIO, fd uintptr) (int64, error) {
|
||||
return mt.GetCurrentRecordFromTape(fd)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user