summaryrefslogtreecommitdiff
path: root/pkg
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2022-08-23 16:20:33 -0400
committerGitHub <noreply@github.com>2022-08-23 16:20:33 -0400
commitedde8570ce7d15baaa33a4a48499bad4cf3377e4 (patch)
tree02f657456fe9a1801d372548102f73739c3c6c83 /pkg
parentcf9c04ae2b61d1eed32a73aad2172d3455a5a9fa (diff)
parentf87f6d2fc193c9b53ac8ba634954a811a32fd057 (diff)
downloadpodman-edde8570ce7d15baaa33a4a48499bad4cf3377e4.tar.gz
podman-edde8570ce7d15baaa33a4a48499bad4cf3377e4.tar.bz2
podman-edde8570ce7d15baaa33a4a48499bad4cf3377e4.zip
Merge pull request #15372 from arixmkii/win_compat
Improved Windows compatibility
Diffstat (limited to 'pkg')
-rw-r--r--pkg/machine/pull.go4
-rw-r--r--pkg/machine/qemu/machine.go8
2 files changed, 6 insertions, 6 deletions
diff --git a/pkg/machine/pull.go b/pkg/machine/pull.go
index 26b6adc67..22a1b4c0a 100644
--- a/pkg/machine/pull.go
+++ b/pkg/machine/pull.go
@@ -213,8 +213,8 @@ func decompressXZ(src string, output io.WriteCloser) error {
var read io.Reader
var cmd *exec.Cmd
// Prefer xz utils for fastest performance, fallback to go xi2 impl
- if _, err := exec.LookPath("xzcat"); err == nil {
- cmd = exec.Command("xzcat", "-k", src)
+ if _, err := exec.LookPath("xz"); err == nil {
+ cmd = exec.Command("xz", "-d", "-c", "-k", src)
read, err = cmd.StdoutPipe()
if err != nil {
return err
diff --git a/pkg/machine/qemu/machine.go b/pkg/machine/qemu/machine.go
index 213f7ce5d..71752a101 100644
--- a/pkg/machine/qemu/machine.go
+++ b/pkg/machine/qemu/machine.go
@@ -545,12 +545,12 @@ func (v *MachineVM) Start(name string, _ machine.StartOptions) error {
return err
}
defer fd.Close()
- dnr, err := os.OpenFile("/dev/null", os.O_RDONLY, 0755)
+ dnr, err := os.OpenFile(os.DevNull, os.O_RDONLY, 0755)
if err != nil {
return err
}
defer dnr.Close()
- dnw, err := os.OpenFile("/dev/null", os.O_WRONLY, 0755)
+ dnw, err := os.OpenFile(os.DevNull, os.O_WRONLY, 0755)
if err != nil {
return err
}
@@ -1216,11 +1216,11 @@ func (v *MachineVM) startHostNetworking() (string, apiForwardingState, error) {
}
attr := new(os.ProcAttr)
- dnr, err := os.OpenFile("/dev/null", os.O_RDONLY, 0755)
+ dnr, err := os.OpenFile(os.DevNull, os.O_RDONLY, 0755)
if err != nil {
return "", noForwarding, err
}
- dnw, err := os.OpenFile("/dev/null", os.O_WRONLY, 0755)
+ dnw, err := os.OpenFile(os.DevNull, os.O_WRONLY, 0755)
if err != nil {
return "", noForwarding, err
}