From 53c84862ce0de17f6d63d26cfa20008c57dc7074 Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Mon, 2 Feb 2009 03:04:47 +0000 Subject: [ftpfs] 2009-02-02 Samuel Thibault * 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 * 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 * 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 * 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 * 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. --- libftpconn/ChangeLog | 5 +++++ libftpconn/unix.c | 7 ++++--- 2 files changed, 9 insertions(+), 3 deletions(-) (limited to 'libftpconn') 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 + + * 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 * 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 (); -- cgit v1.2.3