diff options
author | Otto Moerbeek <otto@cvs.openbsd.org> | 2005-04-02 17:52:28 +0000 |
---|---|---|
committer | Otto Moerbeek <otto@cvs.openbsd.org> | 2005-04-02 17:52:28 +0000 |
commit | 4f8c3f9c15fe445313a82c09b4d655da006f3ebe (patch) | |
tree | 6f3ef38895a13ff44870007e50d42282fbb87f5f /usr.bin | |
parent | 246ba63037060f743d44f19606f6d0688002bb6e (diff) |
Enable birthtime. ok tdeval@ henning@
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/stat/stat.c | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/usr.bin/stat/stat.c b/usr.bin/stat/stat.c index 7249c7d7910..7ffb049e686 100644 --- a/usr.bin/stat/stat.c +++ b/usr.bin/stat/stat.c @@ -1,4 +1,4 @@ -/* $OpenBSD: stat.c,v 1.2 2005/04/02 13:48:35 otto Exp $ */ +/* $OpenBSD: stat.c,v 1.3 2005/04/02 17:52:27 otto Exp $ */ /* $NetBSD: stat.c,v 1.19 2004/06/20 22:20:16 jmc Exp $ */ /* @@ -39,11 +39,9 @@ #ifndef lint static const char rccs_id[] = - "$OpenBSD: stat.c,v 1.2 2005/04/02 13:48:35 otto Exp $"; + "$OpenBSD: stat.c,v 1.3 2005/04/02 17:52:27 otto Exp $"; #endif -#define HAVE_STRUCT_STAT_ST_BIRTHTIME 0 - #include <sys/types.h> #include <sys/stat.h> @@ -63,15 +61,9 @@ static const char rccs_id[] = #define RAW_F "%f " #define SHELL_F " st_flags=%f" -#if HAVE_STRUCT_STAT_ST_BIRTHTIME #define DEF_B "\"%SB\" " #define RAW_B "%B " #define SHELL_B "st_birthtime=%B " -#else /* HAVE_STRUCT_STAT_ST_BIRTHTIME */ -#define DEF_B -#define RAW_B -#define SHELL_B -#endif /* HAVE_STRUCT_STAT_ST_BIRTHTIME */ #define DEF_FORMAT \ "%d %i %Sp %l %Su %Sg %r %z \"%Sa\" \"%Sm\" \"%Sc\" " DEF_B \ @@ -671,14 +663,12 @@ format1(const struct stat *st, nsecs = st->st_ctimensec; } /* FALLTHROUGH */ -#if HAVE_STRUCT_STAT_ST_BIRTHTIME case SHOW_st_btime: if (!gottime) { gottime = 1; - secs = st->st_birthtime; - nsecs = st->st_birthtimensec; + secs = st->__st_birthtimespec.tv_sec; + nsecs = st->__st_birthtimespec.tv_nsec; } -#endif /* HAVE_STRUCT_STAT_ST_BIRTHTIME */ small = (sizeof(secs) == 4); data = secs; small = 1; |