From bcc62b628abe70dd6bee1f06c4e31630209cd8d7 Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Wed, 8 Nov 2017 11:39:17 +0100 Subject: [PATCH] unix: remove unused function syscallMode The unexported function syscallMode was added in CL 47290 but was never used anywhere. Remove it. FWIW this should also fix the build failure on plan9, as the file in question was lacking build tags. Change-Id: Icfd6b2dbcd66ceb2065c945d8a5a6d55e634fe5e Reviewed-on: https://go-review.googlesource.com/76510 Run-TryBot: Tobias Klauser TryBot-Result: Gobot Gobot Reviewed-by: Ian Lance Taylor --- unix/file_unix.go | 27 --------------------------- 1 file changed, 27 deletions(-) delete mode 100644 unix/file_unix.go diff --git a/unix/file_unix.go b/unix/file_unix.go deleted file mode 100644 index 47f6a83f..00000000 --- a/unix/file_unix.go +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright 2017 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package unix - -import ( - "os" - "syscall" -) - -// FIXME: unexported function from os -// syscallMode returns the syscall-specific mode bits from Go's portable mode bits. -func syscallMode(i os.FileMode) (o uint32) { - o |= uint32(i.Perm()) - if i&os.ModeSetuid != 0 { - o |= syscall.S_ISUID - } - if i&os.ModeSetgid != 0 { - o |= syscall.S_ISGID - } - if i&os.ModeSticky != 0 { - o |= syscall.S_ISVTX - } - // No mapping for Go's ModeTemporary (plan9 only). - return -}