Remove building with NOCRYPTO option
[minix.git] / minix / lib / libpuffs / time.c
blob73c07aaf6746c4de6071662920239ab3dfc3d89a
1 /* Created (MFS based):
2 * February 2010 (Evgeniy Ivanov)
3 */
5 #include "fs.h"
8 /*===========================================================================*
9 * fs_utime *
10 *===========================================================================*/
11 int fs_utime(ino_t ino_nr, struct timespec *atime, struct timespec *mtime)
13 struct puffs_node *pn;
14 struct vattr va;
15 PUFFS_MAKECRED(pcr, &global_kcred);
17 if (global_pu->pu_ops.puffs_node_setattr == NULL)
18 return(EINVAL);
20 if( (pn = puffs_pn_nodewalk(global_pu, find_inode_cb, &ino_nr)) == NULL)
21 return(EINVAL);
23 puffs_vattr_null(&va);
24 va.va_atime = *atime;
25 va.va_mtime = *mtime;
26 (void)clock_time(&va.va_ctime);
28 if (global_pu->pu_ops.puffs_node_setattr(global_pu, pn, &va, pcr) != 0)
29 return(EINVAL);
31 return(OK);