refactor: Merge drive and reader config to enable implementations of tape management without synchronization

This commit is contained in:
Felix Pojtinger
2022-01-16 22:46:18 +01:00
parent 932a58d9d0
commit 5bb79b6d9e
28 changed files with 28 additions and 154 deletions
+2 -5
View File
@@ -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 -5
View File
@@ -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)
}