From owner-freebsd-bugs Mon Mar 18 19:40:06 1996 Return-Path: owner-bugs Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id TAA29207 for bugs-outgoing; Mon, 18 Mar 1996 19:40:06 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id TAA29196 Mon, 18 Mar 1996 19:40:04 -0800 (PST) Resent-Date: Mon, 18 Mar 1996 19:40:04 -0800 (PST) Resent-Message-Id: <199603190340.TAA29196@freefall.freebsd.org> Resent-From: gnats (GNATS Management) Resent-To: freebsd-bugs Resent-Reply-To: FreeBSD-gnats@freefall.FreeBSD.org, msmith@atrad.adelaide.edu.au Received: from genesis.atrad.adelaide.edu.au (genesis.atrad.adelaide.edu.au [129.127.96.120]) by freefall.freebsd.org (8.7.3/8.7.3) with ESMTP id TAA28662 for ; Mon, 18 Mar 1996 19:36:43 -0800 (PST) Received: from msmith@localhost by genesis.atrad.adelaide.edu.au (8.6.12/8.6.9) id NAA28024; Tue, 19 Mar 1996 13:27:02 +1030 Message-Id: <199603190257.NAA28024@genesis.atrad.adelaide.edu.au> Date: Tue, 19 Mar 1996 13:27:02 +1030 From: Michael Smith Reply-To: msmith@atrad.adelaide.edu.au To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.2 Subject: docs/1089: stat manpage unclear about st_mtime & friends Sender: owner-bugs@freebsd.org X-Loop: FreeBSD.org Precedence: bulk >Number: 1089 >Category: docs >Synopsis: stat manpage unclear about st_mtime & friends >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Class: doc-bug >Submitter-Id: current-users >Arrival-Date: Mon Mar 18 19:40:02 PST 1996 >Last-Modified: >Originator: Michael Smith >Organization: Genesis Software >Release: FreeBSD 2.1-STABLE i386 (and all up to -current) >Environment: stat(2) manpage. >Description: Consider this portion of the stat(2) manapage (trimmed): struct stat { ... struct timespec st_atimespec; /* time of last access */ struct timespec st_mtimespec; /* time of last data modification */ struct timespec st_ctimespec; /* time of last file status change */ ... }; The time-related fields of struct stat are as follows: st_atime Time when file data last accessed. Changed by the mknod(2), ... st_mtime Time when file data last modified. Changed by the mknod(2), ... st_ctime Time when file status was last changed (inode data modifica- ... It should be mentioned that the names 'st_atime' 'st_mtime' and 'st_ctime' are compatability macros which referece the ts_sec fields in the timespec structs for each of the three. >How-To-Repeat: None >Fix: The time-related fields of struct stat are as follows: st_atimespec Time when file data last accessed. Changed by the mknod(2), utimes(2) and read(2) system calls. st_mtimespec Time when file data last modified. Changed by the mknod(2), utimes(2) and write(2) system calls. st_ctimespec Time when file status was last changed (inode data modifica- tion). Changed by the chmod(2), chown(2), link(2), mknod(2), rename(2), unlink(2), utimes(2) and write(2) system calls. The names 'st_atime', 'st_mtime' and 'st_ctime' are supported for compatability's sake via preprocessor macros which reference the ts_sec fields of the corresponding timestruct. >Audit-Trail: >Unformatted: