Module Name: src Committed By: christos Date: Thu Feb 16 22:44:06 UTC 2017
Modified Files: src/usr.sbin/makefs: msdos.c Log Message: allow 0 timestamp To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/usr.sbin/makefs/msdos.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.17 src/usr.sbin/makefs/msdos.c:1.18 --- src/usr.sbin/makefs/msdos.c:1.17 Thu Feb 16 13:50:04 2017 +++ src/usr.sbin/makefs/msdos.c Thu Feb 16 17:44:06 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: msdos.c,v 1.17 2017/02/16 18:50:04 christos Exp $ */ +/* $NetBSD: msdos.c,v 1.18 2017/02/16 22:44:06 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.17 2017/02/16 18:50:04 christos Exp $"); +__RCSID("$NetBSD: msdos.c,v 1.18 2017/02/16 22:44:06 christos Exp $"); #endif /* !__lint */ #include <sys/param.h> @@ -134,7 +134,10 @@ msdos_parse_opts(const char *option, fsi 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; + if (stampst.st_ino) { + msdos_opt->timestamp_set = 1; + msdos_opt->timestamp = stampst.st_mtime; + } return 1; }