mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
os: use FileMode instead of uint32 in various functions
Fixes #2733 R=chickencha, ality, rsc CC=golang-dev https://golang.org/cl/5553064
This commit is contained in:
parent
ab2ea94c60
commit
6454a3eb15
8 changed files with 33 additions and 17 deletions
|
|
@ -61,8 +61,8 @@ const DevNull = "/dev/null"
|
|||
// (O_RDONLY etc.) and perm, (0666 etc.) if applicable. If successful,
|
||||
// methods on the returned File can be used for I/O.
|
||||
// It returns the File and an error, if any.
|
||||
func OpenFile(name string, flag int, perm uint32) (file *File, err error) {
|
||||
r, e := syscall.Open(name, flag|syscall.O_CLOEXEC, perm)
|
||||
func OpenFile(name string, flag int, perm FileMode) (file *File, err error) {
|
||||
r, e := syscall.Open(name, flag|syscall.O_CLOEXEC, syscallMode(perm))
|
||||
if e != nil {
|
||||
return nil, &PathError{"open", name, e}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue