Commit bcc62b62 authored by Tobias Klauser's avatar Tobias Klauser Committed by Tobias Klauser

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 <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
parent 75813c64
// 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
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment