diff options
author | 2016-10-18 18:15:23 +0000 | |
---|---|---|
committer | 2016-10-18 18:15:23 +0000 | |
commit | 60c13935f5c60bc20b6a8f3d4912202e346c5cf9 (patch) | |
tree | 73e48e1ebd77cbc7a06a4cdcc1dacf8be79d3be3 | |
parent | Don't tell the programmer not to put variable declarations inside (diff) | |
download | wireguard-openbsd-60c13935f5c60bc20b6a8f3d4912202e346c5cf9.tar.xz wireguard-openbsd-60c13935f5c60bc20b6a8f3d4912202e346c5cf9.zip |
Only allow epoch timestamps for -T. A shared option for either using the
timestamps from a file or using an epoch timestamp is ridiculous.
-rw-r--r-- | usr.sbin/makefs/makefs.8 | 10 | ||||
-rw-r--r-- | usr.sbin/makefs/makefs.c | 13 |
2 files changed, 4 insertions, 19 deletions
diff --git a/usr.sbin/makefs/makefs.8 b/usr.sbin/makefs/makefs.8 index 0bcbb8a5cac..f4cb3da44b7 100644 --- a/usr.sbin/makefs/makefs.8 +++ b/usr.sbin/makefs/makefs.8 @@ -1,4 +1,4 @@ -.\" $OpenBSD: makefs.8,v 1.7 2016/10/18 17:38:20 natano Exp $ +.\" $OpenBSD: makefs.8,v 1.8 2016/10/18 18:15:23 natano Exp $ .\" $NetBSD: makefs.8,v 1.55 2015/11/25 16:32:00 wiz Exp $ .\" .\" Copyright (c) 2001-2003 Wasabi Systems, Inc. @@ -116,13 +116,7 @@ Specify a timestamp to be set for all file system files and directories created so that repeatable builds are possible. The .Ar timestamp -can be a -.Pa pathname , -where the timestamps are derived from that file, a parseable date -for -.Xr parsedate 3 -(this option is not yet available in the tools build), or an integer -value interpreted as the number of seconds from the Epoch. +is an integer value interpreted as the number of seconds from the Epoch. .It Fl t Ar fs-type Create an .Ar fs-type diff --git a/usr.sbin/makefs/makefs.c b/usr.sbin/makefs/makefs.c index a2a7d6a0f2c..bc80beef6a8 100644 --- a/usr.sbin/makefs/makefs.c +++ b/usr.sbin/makefs/makefs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: makefs.c,v 1.9 2016/10/18 17:38:20 natano Exp $ */ +/* $OpenBSD: makefs.c,v 1.10 2016/10/18 18:15:23 natano Exp $ */ /* $NetBSD: makefs.c,v 1.53 2015/11/27 15:10:32 joerg Exp $ */ /* @@ -199,12 +199,6 @@ main(int argc, char *argv[]) /* NOTREACHED */ } } - if (debug) { - printf("debug mask: 0x%08x\n", debug); - printf("start time: %ld.%ld, %s", - (long)start_time.tv_sec, (long)start_time.tv_nsec, - ctime(&start_time.tv_sec)); - } argc -= optind; argv += optind; @@ -337,9 +331,6 @@ get_tstamp(const char *b, struct stat *st) time_t when; char *eb; - if (stat(b, st) != -1) - return 0; - errno = 0; when = strtoll(b, &eb, 0); if (b == eb || *eb || errno) @@ -372,7 +363,7 @@ usage(fstype_t *fstype, fsinfo_t *fsoptions) fprintf(stderr, "Usage: %s [-b free-blocks] [-f free-files] [-M minimum-size]\n" "\t[-m maximum-size] [-O offset] [-o fs-options] [-S sector-size]\n" -"\t[-s image-size] [-T <timestamp/file>] [-t fs-type] image-file directory\n", +"\t[-s image-size] [-T timestamp] [-t fs-type] image-file directory\n", prog); if (fstype) { |