github.com/hanwen/go-fuse@v1.0.0/fuse/nodefs/syscall_linux.go (about)

     1  // Copyright 2016 the Go-FUSE Authors. All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  package nodefs
     6  
     7  import (
     8  	"syscall"
     9  	"unsafe"
    10  )
    11  
    12  // futimens - futimens(3) calls utimensat(2) with "pathname" set to null and
    13  // "flags" set to zero
    14  func futimens(fd int, times *[2]syscall.Timespec) (err error) {
    15  	_, _, e1 := syscall.Syscall6(syscall.SYS_UTIMENSAT, uintptr(fd), 0, uintptr(unsafe.Pointer(times)), uintptr(0), 0, 0)
    16  	if e1 != 0 {
    17  		err = syscall.Errno(e1)
    18  	}
    19  	return
    20  }