summaryrefslogtreecommitdiff
path: root/pkg/machine/qemu
diff options
context:
space:
mode:
authorArthur Sengileyev <arthur.sengileyev@gmail.com>2022-08-16 13:39:02 +0300
committerMatthew Heon <mheon@redhat.com>2022-09-06 14:12:53 -0400
commitee9d3fd02147070cb513609b01c5ab4417ebce6b (patch)
treefc280ade904cf754c6ed00e15392b6f0a46b1cdb /pkg/machine/qemu
parent9d8c17ec08f472e1685a77abcbfce2fa5032ee7c (diff)
downloadpodman-ee9d3fd02147070cb513609b01c5ab4417ebce6b.tar.gz
podman-ee9d3fd02147070cb513609b01c5ab4417ebce6b.tar.bz2
podman-ee9d3fd02147070cb513609b01c5ab4417ebce6b.zip
Improved Windows compatibility
Signed-off-by: Arthur Sengileyev <arthur.sengileyev@gmail.com>
Diffstat (limited to 'pkg/machine/qemu')
-rw-r--r--pkg/machine/qemu/machine.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/pkg/machine/qemu/machine.go b/pkg/machine/qemu/machine.go
index 7974c261e..5a451c02a 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
}