38 lines
968 B
Go
38 lines
968 B
Go
//go:build !linux && !windows
|
|
|
|
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"runtime"
|
|
)
|
|
|
|
func logicalSectorSize(string) (int64, error) { return 512, nil }
|
|
|
|
type diskAttachment struct {
|
|
blockPath string
|
|
cleanup func()
|
|
}
|
|
|
|
func attachDisk(string, bool) (*diskAttachment, error) {
|
|
return nil, fmt.Errorf("clone-disk is only implemented on linux and windows (this is %s)", runtime.GOOS)
|
|
}
|
|
|
|
func partNode(disk string, num int) string { return fmt.Sprintf("%s%d", disk, num) }
|
|
|
|
func probeDiskLayout(string) (*DiskLayout, error) {
|
|
return nil, fmt.Errorf("clone-disk is only implemented on linux and windows (this is %s)", runtime.GOOS)
|
|
}
|
|
|
|
func applyPartitionTable(string, string) error {
|
|
return fmt.Errorf("clone-disk partition rebuild is only implemented on linux and windows")
|
|
}
|
|
|
|
func rereadPartTable(string) {}
|
|
|
|
func lsblkFSType(string) string { return "" }
|
|
|
|
func mountAt(string, bool) (string, func(), error) {
|
|
return "", nil, fmt.Errorf("mount is only implemented on linux")
|
|
}
|