6b7ca566df
After an interrupted attach wizard, the raw mount stays behind, causing the device to appear as "mounted" in scan results. Now the scan button calls cancel first, which unmounts any stale raw mounts that have no bind mount in fstab. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
34 lines
1.1 KiB
Go
34 lines
1.1 KiB
Go
//go:build !linux
|
|
|
|
package storage
|
|
|
|
import "fmt"
|
|
|
|
// MountRaw is not supported on non-Linux platforms.
|
|
func MountRaw(devicePath string) (string, error) {
|
|
return "", fmt.Errorf("storage attach is only supported on Linux")
|
|
}
|
|
|
|
// ListDirectories is not supported on non-Linux platforms.
|
|
func ListDirectories(basePath string) ([]DirEntry, error) {
|
|
return nil, fmt.Errorf("storage attach is only supported on Linux")
|
|
}
|
|
|
|
// CreateDirectory is not supported on non-Linux platforms.
|
|
func CreateDirectory(basePath, name string) (string, error) {
|
|
return "", fmt.Errorf("storage attach is only supported on Linux")
|
|
}
|
|
|
|
// FinalizeAttach is not supported on non-Linux platforms.
|
|
func FinalizeAttach(req AttachRequest, progress chan<- FormatProgress) (string, error) {
|
|
return "", fmt.Errorf("storage attach is only supported on Linux")
|
|
}
|
|
|
|
// CleanupRawMount is not supported on non-Linux platforms.
|
|
func CleanupRawMount(rawPath string) error {
|
|
return fmt.Errorf("storage attach is only supported on Linux")
|
|
}
|
|
|
|
// CleanupStaleRawMounts is a no-op on non-Linux platforms.
|
|
func CleanupStaleRawMounts() {}
|