Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.sbin/makefs start fixing msdosfs for reproducible builds...
details: https://anonhg.NetBSD.org/src/rev/9683f404d962
branches: trunk
changeset: 821762:9683f404d962
user: christos <christos%NetBSD.org@localhost>
date: Thu Feb 16 18:50:04 2017 +0000
description:
start fixing msdosfs for reproducible builds; does not work yet.
diffstat:
usr.sbin/makefs/msdos.c | 7 +++++--
usr.sbin/makefs/msdos/msdosfs_vnops.c | 20 ++++++++++++++------
2 files changed, 19 insertions(+), 8 deletions(-)
diffs (71 lines):
diff -r c7141c1b6880 -r 9683f404d962 usr.sbin/makefs/msdos.c
--- a/usr.sbin/makefs/msdos.c Thu Feb 16 18:49:31 2017 +0000
+++ b/usr.sbin/makefs/msdos.c Thu Feb 16 18:50:04 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: msdos.c,v 1.16 2016/01/30 09:59:27 mlelstv Exp $ */
+/* $NetBSD: msdos.c,v 1.17 2017/02/16 18:50:04 christos Exp $ */
/*-
* Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
#include <sys/cdefs.h>
#if defined(__RCSID) && !defined(__lint)
-__RCSID("$NetBSD: msdos.c,v 1.16 2016/01/30 09:59:27 mlelstv Exp $");
+__RCSID("$NetBSD: msdos.c,v 1.17 2017/02/16 18:50:04 christos Exp $");
#endif /* !__lint */
#include <sys/param.h>
@@ -133,6 +133,9 @@
msdos_opt->media_descriptor_set = 1;
else if (strcmp(msdos_options[rv].name, "hidden_sectors") == 0)
msdos_opt->hidden_sectors_set = 1;
+
+ msdos_opt->timestamp = stampst.st_ino ? stampst.st_mtime : 0;
+
return 1;
}
diff -r c7141c1b6880 -r 9683f404d962 usr.sbin/makefs/msdos/msdosfs_vnops.c
--- a/usr.sbin/makefs/msdos/msdosfs_vnops.c Thu Feb 16 18:49:31 2017 +0000
+++ b/usr.sbin/makefs/msdos/msdosfs_vnops.c Thu Feb 16 18:50:04 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: msdosfs_vnops.c,v 1.17 2016/01/30 09:59:27 mlelstv Exp $ */
+/* $NetBSD: msdosfs_vnops.c,v 1.18 2017/02/16 18:50:05 christos Exp $ */
/*-
* Copyright (C) 1994, 1995, 1997 Wolfgang Solfrank.
@@ -51,7 +51,7 @@
#endif
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: msdosfs_vnops.c,v 1.17 2016/01/30 09:59:27 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: msdosfs_vnops.c,v 1.18 2017/02/16 18:50:05 christos Exp $");
#include <sys/param.h>
#include <sys/mman.h>
@@ -98,12 +98,20 @@
msdosfs_times(struct msdosfsmount *pmp, struct denode *dep,
const struct stat *st)
{
+ struct timespec at;
+ struct timespec mt;
+
+ if (stampst.st_ino)
+ st = &stampst;
+
#ifndef HAVE_NBTOOL_CONFIG_H
- struct timespec at = st->st_atimespec;
- struct timespec mt = st->st_mtimespec;
+ at = st->st_atimespec;
+ mt = st->st_mtimespec;
#else
- struct timespec at = { st->st_atime, 0 };
- struct timespec mt = { st->st_mtime, 0 };
+ at.tv_sec = st->st_atime;
+ at.tv_nsec = 0;
+ mt.tv_sec = st->st_mtime;
+ mt.tv_nsec = 0;
#endif
unix2dostime(&at, pmp->pm_gmtoff, &dep->de_ADate, NULL, NULL);
unix2dostime(&mt, pmp->pm_gmtoff, &dep->de_MDate, &dep->de_MTime, NULL);
Home |
Main Index |
Thread Index |
Old Index