summaryrefslogtreecommitdiff
path: root/libftpconn
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2009-02-02 03:04:47 +0000
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2009-02-02 03:04:47 +0000
commit53c84862ce0de17f6d63d26cfa20008c57dc7074 (patch)
tree8172c29f4836491a1cf0b213e9f38f5478f7594c /libftpconn
parent85e3a07564fa347c8b801d35b6b7d6c1a917b775 (diff)
[ftpfs]
2009-02-02 Samuel Thibault <samuel.thibault@ens-lyon.org> * dir.c (ftpfs_refresh_node): Use st_mtim.tv_sec members instead of st_mtime. Also compare st_mtim.tv_nsec members. [libdiskfs] 2009-02-02 Samuel Thibault <samuel.thibault@ens-lyon.org> * file-utimes.c (diskfs_S_file_utimes): Use st_atim.tv_sec/ st_mtim.tv_sec members instead of st_atime/st_mtime. Also set st_atim.tv_nsec/st_mtim.tv_nsec members. [libftpconn] 2009-02-02 Samuel Thibault <samuel.thibault@ens-lyon.org> * unix.c (parse_dir_entry): Use st_mtim.tv_sec instead of st_mtime. Set st_atim.tv_nsec, st_ctim.tv_nsec and st_mtim.tv_nsec to 0. [login] 2009-02-02 Samuel Thibault <samuel.thibault@ens-lyon.org> * utmp.c (S_login_get_idle_time): Use st_atim.tv_sec and st_atim.tv_nsec members instead of st_atime and st_atime_usec. [tmpfs] 2009-02-02 Samuel Thibault <samuel.thibault@ens-lyon.org> * tmpfs.h (struct disknode): Make atime, mtime and ctime members struct timespec instead of time_t. * tmpfs.c (main): Copy st_atim/st_mtim/st_ctim members from st to diskfs_root_node->dn_stat instead of st_atime/st_mtime/st_ctime. * node.c (diskfs_node_norefs): Copy st_atime/st_mtime/st_ctime members from np->dn_stat to atime/mtime/ctime members of np->dn (diskfs_cached_lookup): Conversely.
Diffstat (limited to 'libftpconn')
-rw-r--r--libftpconn/ChangeLog5
-rw-r--r--libftpconn/unix.c7
2 files changed, 9 insertions, 3 deletions
diff --git a/libftpconn/ChangeLog b/libftpconn/ChangeLog
index 409e6b0a..9f69ea25 100644
--- a/libftpconn/ChangeLog
+++ b/libftpconn/ChangeLog
@@ -1,3 +1,8 @@
+2009-02-02 Samuel Thibault <samuel.thibault@ens-lyon.org>
+
+ * unix.c (parse_dir_entry): Use st_mtim.tv_sec instead of st_mtime.
+ Set st_atim.tv_nsec, st_ctim.tv_nsec and st_mtim.tv_nsec to 0.
+
2002-10-19 Roland McGrath <roland@frob.com>
* unix.c (ftp_conn_unix_start_get_stats): Pass dirname a copy of NAME
diff --git a/libftpconn/unix.c b/libftpconn/unix.c
index e2a460c7..d279a7a6 100644
--- a/libftpconn/unix.c
+++ b/libftpconn/unix.c
@@ -510,12 +510,13 @@ drwxrwxrwt 7 34 archive 512 May 1 14:28 /tmp
else
tm.tm_year = PARSE_INT () - 1900;
- stat->st_mtime = mktime (&tm);
- if (stat->st_mtime == (time_t)-1)
+ stat->st_mtim.tv_sec = mktime (&tm);
+ if (stat->st_mtim.tv_sec == (time_t)-1)
return EGRATUITOUS;
/* atime and ctime are the same as mtime. */
- stat->st_atime = stat->st_ctime = stat->st_mtime;
+ stat->st_atim.tv_sec = stat->st_ctim.tv_sec = stat->st_mtim.tv_sec;
+ stat->st_atim.tv_nsec = stat->st_ctim.tv_nsec = stat->st_mtim.tv_nsec = 0;
/* Update *LINE to point to the filename. */
SKIP_WS ();