Subject: kern/26155: stat(2) always returns 0 for atime
To: None <>
From: Manuel Bouyer <>
List: netbsd-bugs
Date: 07/03/2004 23:16:44
>Number:         26155
>Category:       kern
>Synopsis:       stat(2) always returns 0 for atime
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Jul 03 21:17:00 UTC 2004
>Originator:     Manuel Bouyer
>Release:        NetBSD 2.0_BETA, sources of Jul, 3
System: NetBSD 2.0_BETA NetBSD 2.0_BETA (CHASSIRON) #0: Sat Jul 3 19:31:18 CEST 2004 sparc
Architecture: sparc
Machine: sparc
	This program:

#include <sys/stat.h>

        struct stat st;

        while (1) {
                stat("/etc/passwd", &st);
                printf("size %ld atime %ld mtime %ld\n", st.st_size, st.st_atime, st.st_mtime);

	always return 0 for atime. Tested with file FFS and NFS.
	see above