diff options
Diffstat (limited to 'libtrivfs/times.c')
-rw-r--r-- | libtrivfs/times.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/libtrivfs/times.c b/libtrivfs/times.c index 2c527612..d2fcc589 100644 --- a/libtrivfs/times.c +++ b/libtrivfs/times.c @@ -1,5 +1,5 @@ /* - Copyright (C) 1994 Free Software Foundation + Copyright (C) 1994, 1999, 2007 Free Software Foundation This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as @@ -25,9 +25,9 @@ trivfs_set_atime (struct trivfs_control *cntl) time_value_t mtime; io_stat (cntl->underlying, &st); - mtime.seconds = st.st_mtime; - mtime.microseconds = st.st_mtime_usec; - host_get_time (mach_host_self (), &atime); + mtime.seconds = st.st_mtim.tv_sec; + mtime.microseconds = st.st_mtim.tv_nsec / 1000; + atime.microseconds = -1; file_utimes (cntl->underlying, atime, mtime); return 0; } @@ -40,9 +40,9 @@ trivfs_set_mtime (struct trivfs_control *cntl) time_value_t mtime; io_stat (cntl->underlying, &st); - atime.seconds = st.st_atime; - atime.microseconds = st.st_atime_usec; - host_get_time (mach_host_self (), &mtime); + atime.seconds = st.st_atim.tv_sec; + atime.microseconds = st.st_atim.tv_nsec / 1000; + mtime.microseconds = -1; file_utimes (cntl->underlying, atime, mtime); return 0; } |