diff options
| author | christos <christos@NetBSD.org> | 2017-02-16 22:44:06 +0000 |
|---|---|---|
| committer | christos <christos@NetBSD.org> | 2017-02-16 22:44:06 +0000 |
| commit | d906b57bd2fcfbb973e6b85a43c5d905da908d27 (patch) | |
| tree | ccb54e66af3f32bff39774a4a00064e45f90b5db /usr.sbin/makefs | |
| parent | 441df6f8399833555ed55d04191184d87ecf3d27 (diff) | |
allow 0 timestamp
Diffstat (limited to 'usr.sbin/makefs')
| -rw-r--r-- | usr.sbin/makefs/msdos.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/usr.sbin/makefs/msdos.c b/usr.sbin/makefs/msdos.c index 6200d83bb4b..857951db6f9 100644 --- a/usr.sbin/makefs/msdos.c +++ b/usr.sbin/makefs/msdos.c @@ -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, fsinfo_t *fsopts) 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; } |
