1 /* Created (MFS based):
2 * February 2010 (Evgeniy Ivanov)
11 /*===========================================================================*
13 *===========================================================================*/
14 int fs_utime(ino_t ino_nr
, struct timespec
*atime
, struct timespec
*mtime
)
16 register struct inode
*rip
;
18 /* Temporarily open the file. */
19 if( (rip
= get_inode(fs_dev
, ino_nr
)) == NULL
)
22 rip
->i_update
= CTIME
; /* discard any stale ATIME and MTIME flags */
24 switch (atime
->tv_nsec
) {
26 rip
->i_update
|= ATIME
;
28 case UTIME_OMIT
: /* do not touch */
31 /* Ext2FS does not support subsecond resolution, so we round down. */
32 rip
->i_atime
= atime
->tv_sec
;
36 switch (mtime
->tv_nsec
) {
38 rip
->i_update
|= MTIME
;
40 case UTIME_OMIT
: /* do not touch */
43 /* Ext2FS does not support subsecond resolution, so we round down. */
44 rip
->i_mtime
= mtime
->tv_sec
;
48 rip
->i_dirt
= IN_DIRTY
;