refactor: Merge drive and reader config to enable implementations of tape management without synchronization
This commit is contained in:
@@ -2,11 +2,8 @@ package hardware
|
||||
|
||||
import (
|
||||
"github.com/pojntfx/stfs/internal/mtio"
|
||||
"github.com/pojntfx/stfs/pkg/config"
|
||||
)
|
||||
|
||||
func Eject(
|
||||
state config.DriveConfig,
|
||||
) error {
|
||||
return mtio.EjectTape(state.Drive.Fd())
|
||||
func Eject(fd uintptr) error {
|
||||
return mtio.EjectTape(fd)
|
||||
}
|
||||
|
||||
@@ -2,11 +2,8 @@ package hardware
|
||||
|
||||
import (
|
||||
"github.com/pojntfx/stfs/internal/mtio"
|
||||
"github.com/pojntfx/stfs/pkg/config"
|
||||
)
|
||||
|
||||
func Tell(
|
||||
state config.DriveConfig,
|
||||
) (int64, error) {
|
||||
return mtio.GetCurrentRecordFromTape(state.Drive.Fd())
|
||||
func Tell(fd uintptr) (int64, error) {
|
||||
return mtio.GetCurrentRecordFromTape(fd)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user