diff --git a/pkg/machine/qemu/machine_windows.go b/pkg/machine/qemu/machine_windows.go index 763f9bd16a..a6821c87f2 100644 --- a/pkg/machine/qemu/machine_windows.go +++ b/pkg/machine/qemu/machine_windows.go @@ -5,8 +5,6 @@ package qemu import ( "bytes" "fmt" - "regexp" - "strings" "github.com/containers/podman/v5/pkg/machine" ) @@ -27,29 +25,6 @@ func checkProcessStatus(processHint string, pid int, stderrBuf *bytes.Buffer) er return nil } -func pathsFromVolume(volume string) []string { - paths := strings.SplitN(volume, ":", 3) - driveLetterMatcher := regexp.MustCompile(`^(?:\\\\[.?]\\)?[a-zA-Z]$`) - if len(paths) > 1 && driveLetterMatcher.MatchString(paths[0]) { - paths = strings.SplitN(volume, ":", 4) - paths = append([]string{paths[0] + ":" + paths[1]}, paths[2:]...) - } - return paths -} - -func extractTargetPath(paths []string) string { - if len(paths) > 1 { - return paths[1] - } - target := strings.ReplaceAll(paths[0], "\\", "/") - target = strings.ReplaceAll(target, ":", "/") - if strings.HasPrefix(target, "//./") || strings.HasPrefix(target, "//?/") { - target = target[4:] - } - dedup := regexp.MustCompile(`//+`) - return dedup.ReplaceAllLiteralString("/"+target, "/") -} - func sigKill(pid int) error { return nil } diff --git a/pkg/machine/qemu/options_freebsd.go b/pkg/machine/qemu/options_freebsd.go deleted file mode 100644 index 136d1ffb3f..0000000000 --- a/pkg/machine/qemu/options_freebsd.go +++ /dev/null @@ -1,19 +0,0 @@ -//go:build freebsd - -package qemu - -import ( - "os" -) - -func getRuntimeDir() (string, error) { - tmpDir, ok := os.LookupEnv("TMPDIR") - if !ok { - tmpDir = "/tmp" - } - return tmpDir, nil -} - -func useNetworkRecover() bool { - return false -} diff --git a/pkg/machine/qemu/options_windows.go b/pkg/machine/qemu/options_windows.go deleted file mode 100644 index 111b630424..0000000000 --- a/pkg/machine/qemu/options_windows.go +++ /dev/null @@ -1,19 +0,0 @@ -//go:build windows - -package qemu - -import ( - "os" -) - -func getRuntimeDir() (string, error) { - tmpDir, ok := os.LookupEnv("TEMP") - if !ok { - tmpDir = os.Getenv("LOCALAPPDATA") + "\\Temp" - } - return tmpDir, nil -} - -func useNetworkRecover() bool { - return false -}