Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F160495622
D37120.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D37120.id.diff
View Options
diff --git a/usr.bin/mktemp/mktemp.1 b/usr.bin/mktemp/mktemp.1
--- a/usr.bin/mktemp/mktemp.1
+++ b/usr.bin/mktemp/mktemp.1
@@ -28,7 +28,7 @@
.\" From: $OpenBSD: mktemp.1,v 1.8 1998/03/19 06:13:37 millert Exp $
.\" $FreeBSD$
.\"
-.Dd December 30, 2005
+.Dd August 4, 2022
.Dt MKTEMP 1
.Os
.Sh NAME
@@ -132,9 +132,9 @@
.Sh OPTIONS
The available options are as follows:
.Bl -tag -width indent
-.It Fl d
+.It Fl d , Fl -directory
Make a directory instead of a file.
-.It Fl q
+.It Fl q , Fl -quiet
Fail silently if an error occurs.
This is useful if
a script does not want error output to go to standard error.
@@ -144,7 +144,7 @@
and
.Ev TMPDIR
if set) to create a filename template.
-.It Fl u
+.It Fl u , Fl -dry-run
Operate in
.Dq unsafe
mode.
diff --git a/usr.bin/mktemp/mktemp.c b/usr.bin/mktemp/mktemp.c
--- a/usr.bin/mktemp/mktemp.c
+++ b/usr.bin/mktemp/mktemp.c
@@ -37,6 +37,7 @@
*/
#include <err.h>
+#include <getopt.h>
#include <paths.h>
#include <stdio.h>
#include <stdlib.h>
@@ -50,6 +51,13 @@
static void usage(void);
+static const struct option long_opts[] = {
+ {"directory", no_argument, NULL, 'd'},
+ {"quiet", no_argument, NULL, 'q'},
+ {"dry-run", no_argument, NULL, 'u'},
+ {NULL, no_argument, NULL, 0},
+};
+
int
main(int argc, char **argv)
{
@@ -63,7 +71,7 @@
prefix = "mktemp";
name = NULL;
- while ((c = getopt(argc, argv, "dqt:u")) != -1)
+ while ((c = getopt_long(argc, argv, "dqt:u", long_opts, NULL)) != -1)
switch (c) {
case 'd':
dflag++;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Jun 26, 2:47 AM (11 h, 21 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
34338010
Default Alt Text
D37120.id.diff (1 KB)
Attached To
Mode
D37120: mktemp: add some GNU-compatible long options
Attached
Detach File
Event Timeline
Log In to Comment