From 4d0c26aa79c06389475e770938fb6a671fa8e544 Mon Sep 17 00:00:00 2001 From: rillig Date: Mon, 19 Nov 2007 08:41:25 +0000 Subject: Even on non-BSD systems, the "-R all" option should disable printing of the "time" attribute. Noticed by Malcolm Herbert on tech-pkg. --- pkgtools/mtree/files/create.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'pkgtools') diff --git a/pkgtools/mtree/files/create.c b/pkgtools/mtree/files/create.c index 1a3f693b5e7..a0e1fba7f2e 100644 --- a/pkgtools/mtree/files/create.c +++ b/pkgtools/mtree/files/create.c @@ -1,4 +1,4 @@ -/* $NetBSD: create.c,v 1.4 2004/08/21 04:10:45 jlam Exp $ */ +/* $NetBSD: create.c,v 1.5 2007/11/19 08:41:25 rillig Exp $ */ /*- * Copyright (c) 1989, 1993 @@ -36,7 +36,9 @@ #include "nbtool_config.h" #endif +#if HAVE_NBCOMPAT_H #include +#endif #if HAVE_SYS_CDEFS_H #include #endif @@ -44,7 +46,7 @@ #if 0 static char sccsid[] = "@(#)create.c 8.1 (Berkeley) 6/6/93"; #else -__RCSID("$NetBSD: create.c,v 1.4 2004/08/21 04:10:45 jlam Exp $"); +__RCSID("$NetBSD: create.c,v 1.5 2007/11/19 08:41:25 rillig Exp $"); #endif #endif /* not lint */ @@ -222,8 +224,8 @@ statf(FTSENT *p) output(&indent, "nlink=%u", p->fts_statp->st_nlink); if (keys & F_SIZE && S_ISREG(p->fts_statp->st_mode)) output(&indent, "size=%lld", (long long)p->fts_statp->st_size); -#if defined(BSD4_4) && !defined(HAVE_NBTOOL_CONFIG_H) if (keys & F_TIME) +#if defined(BSD4_4) && !defined(HAVE_NBTOOL_CONFIG_H) output(&indent, "time=%ld.%ld", (long)p->fts_statp->st_mtimespec.tv_sec, p->fts_statp->st_mtimespec.tv_nsec); -- cgit v1.2.3