Move detach flags to platform specific
Signed-off-by: Derek McGowan <derek@mcgstyle.net>
This commit is contained in:
5
snapshot/testsuite/helpers_linux.go
Normal file
5
snapshot/testsuite/helpers_linux.go
Normal file
@@ -0,0 +1,5 @@
|
||||
package testsuite
|
||||
|
||||
import "golang.org/x/sys/unix"
|
||||
|
||||
const umountflags int = unix.MNT_DETACH
|
||||
5
snapshot/testsuite/helpers_other.go
Normal file
5
snapshot/testsuite/helpers_other.go
Normal file
@@ -0,0 +1,5 @@
|
||||
// +build !linux
|
||||
|
||||
package testsuite
|
||||
|
||||
const umountflags int = 0
|
||||
@@ -2,13 +2,7 @@
|
||||
|
||||
package testsuite
|
||||
|
||||
import (
|
||||
"syscall"
|
||||
|
||||
"golang.org/x/sys/unix"
|
||||
)
|
||||
|
||||
const umountflags int = unix.MNT_DETACH
|
||||
import "syscall"
|
||||
|
||||
func clearMask() func() {
|
||||
oldumask := syscall.Umask(0)
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
package testsuite
|
||||
|
||||
const umountflags int = 0
|
||||
|
||||
func clearMask() func() {
|
||||
return func() {}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user