1 #include <sys/cdefs.h> 2 #include "namespace.h" 3 #include <lib.h> 4 5 #include <string.h> 6 #include <sys/stat.h> 7 futimens(int fd,const struct timespec tv[2])8int futimens(int fd, const struct timespec tv[2]) 9 { 10 message m; 11 static const struct timespec now[2] = { {0, UTIME_NOW}, {0, UTIME_NOW} }; 12 13 if (tv == NULL) tv = now; 14 15 memset(&m, 0, sizeof(m)); 16 m.m_vfs_utimens.fd = fd; 17 m.m_vfs_utimens.atime = tv[0].tv_sec; 18 m.m_vfs_utimens.mtime = tv[1].tv_sec; 19 m.m_vfs_utimens.ansec = tv[0].tv_nsec; 20 m.m_vfs_utimens.mnsec = tv[1].tv_nsec; 21 m.m_vfs_utimens.name = NULL; 22 m.m_vfs_utimens.flags = 0; 23 24 return(_syscall(VFS_PROC_NR, VFS_UTIMENS, &m)); 25 } 26