Skip to content

Commit 9649ec1

Browse files
committed
pkg/ns: use file system magic numbers from golang.org/x/sys/unix
Use the constants already defined in the golang.org/x/sys/unix package instead of open-coding them. Signed-off-by: Tobias Klauser <[email protected]>
1 parent 27e830b commit 9649ec1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pkg/ns/ns_linux.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,8 @@ var _ NetNS = &netNS{}
106106

107107
const (
108108
// https://github.com/torvalds/linux/blob/master/include/uapi/linux/magic.h
109-
NSFS_MAGIC = 0x6e736673
110-
PROCFS_MAGIC = 0x9fa0
109+
NSFS_MAGIC = unix.NSFS_MAGIC
110+
PROCFS_MAGIC = unix.PROC_SUPER_MAGIC
111111
)
112112

113113
type NSPathNotExistErr struct{ msg string }

0 commit comments

Comments
 (0)