Module Name: src Committed By: christos Date: Thu Feb 16 18:50:05 UTC 2017
Modified Files: src/usr.sbin/makefs: msdos.c src/usr.sbin/makefs/msdos: msdosfs_vnops.c Log Message: start fixing msdosfs for reproducible builds; does not work yet. To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/usr.sbin/makefs/msdos.c cvs rdiff -u -r1.17 -r1.18 src/usr.sbin/makefs/msdos/msdosfs_vnops.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/usr.sbin/makefs/msdos.c diff -u src/usr.sbin/makefs/msdos.c:1.16 src/usr.sbin/makefs/msdos.c:1.17 --- src/usr.sbin/makefs/msdos.c:1.16 Sat Jan 30 04:59:27 2016 +++ src/usr.sbin/makefs/msdos.c Thu Feb 16 13:50:04 2017 @@ -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_parse_opts(const char *option, fsi 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; } Index: src/usr.sbin/makefs/msdos/msdosfs_vnops.c diff -u src/usr.sbin/makefs/msdos/msdosfs_vnops.c:1.17 src/usr.sbin/makefs/msdos/msdosfs_vnops.c:1.18 --- src/usr.sbin/makefs/msdos/msdosfs_vnops.c:1.17 Sat Jan 30 04:59:27 2016 +++ src/usr.sbin/makefs/msdos/msdosfs_vnops.c Thu Feb 16 13:50:05 2017 @@ -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 @@ static void 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);