From 9649ec14f51cba2f6a44ff7401abb43bd6859a1f Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Thu, 20 Jan 2022 12:43:20 +0100 Subject: [PATCH] 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 --- pkg/ns/ns_linux.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/ns/ns_linux.go b/pkg/ns/ns_linux.go index 3b745d49..f260f281 100644 --- a/pkg/ns/ns_linux.go +++ b/pkg/ns/ns_linux.go @@ -106,8 +106,8 @@ var _ NetNS = &netNS{} const ( // https://github.com/torvalds/linux/blob/master/include/uapi/linux/magic.h - NSFS_MAGIC = 0x6e736673 - PROCFS_MAGIC = 0x9fa0 + NSFS_MAGIC = unix.NSFS_MAGIC + PROCFS_MAGIC = unix.PROC_SUPER_MAGIC ) type NSPathNotExistErr struct{ msg string }