Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/stat Take the time to set gottime so that you don't ...
details: https://anonhg.NetBSD.org/src/rev/97fb7a4c3ef5
branches: trunk
changeset: 554518:97fb7a4c3ef5
user: atatat <atatat%NetBSD.org@localhost>
date: Wed Oct 29 04:25:46 2003 +0000
description:
Take the time to set gottime so that you don't have to waste time
trying to figure out why the time isn't the time you expected all the
time.
diffstat:
usr.bin/stat/stat.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diffs (42 lines):
diff -r a06b750b3c6a -r 97fb7a4c3ef5 usr.bin/stat/stat.c
--- a/usr.bin/stat/stat.c Wed Oct 29 03:54:17 2003 +0000
+++ b/usr.bin/stat/stat.c Wed Oct 29 04:25:46 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: stat.c,v 1.16 2003/10/27 00:16:21 lukem Exp $ */
+/* $NetBSD: stat.c,v 1.17 2003/10/29 04:25:46 atatat Exp $ */
/*
* Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -42,7 +42,7 @@
#include <sys/cdefs.h>
#if !defined(lint)
-__RCSID("$NetBSD: stat.c,v 1.16 2003/10/27 00:16:21 lukem Exp $");
+__RCSID("$NetBSD: stat.c,v 1.17 2003/10/29 04:25:46 atatat Exp $");
#endif
#if ! HAVE_NBTOOL_CONFIG_H
@@ -676,6 +676,7 @@
/* FALLTHROUGH */
case SHOW_st_mtime:
if (!gottime) {
+ gottime = 1;
secs = st->st_mtime;
#if HAVE_STRUCT_STAT_ST_MTIMENSEC
nsecs = st->st_mtimensec;
@@ -684,6 +685,7 @@
/* FALLTHROUGH */
case SHOW_st_ctime:
if (!gottime) {
+ gottime = 1;
secs = st->st_ctime;
#if HAVE_STRUCT_STAT_ST_MTIMENSEC
nsecs = st->st_ctimensec;
@@ -693,6 +695,7 @@
#if HAVE_STRUCT_STAT_ST_BIRTHTIME
case SHOW_st_btime:
if (!gottime) {
+ gottime = 1;
secs = st->st_birthtimespec.tv_sec;
nsecs = st->st_birthtimespec.tv_nsec;
}
Home |
Main Index |
Thread Index |
Old Index