summaryrefslogtreecommitdiffstats
path: root/usr.bin/uname
diff options
context:
space:
mode:
authorsteve <steve@FreeBSD.org>1998-02-24 16:57:49 +0000
committersteve <steve@FreeBSD.org>1998-02-24 16:57:49 +0000
commitf49ad64cb5e38fd9d04a8ad3e1fffb8796bc19b8 (patch)
tree954a3344f56259c860476d4e1db0ca89fe37d9b6 /usr.bin/uname
parent14b406e4769f4ee3f8aebeb2881c09c170aed100 (diff)
downloadFreeBSD-src-f49ad64cb5e38fd9d04a8ad3e1fffb8796bc19b8.zip
FreeBSD-src-f49ad64cb5e38fd9d04a8ad3e1fffb8796bc19b8.tar.gz
Add a -p option which is the same as the -m option but provided
for SVR4 compatibility. PR: 5826
Diffstat (limited to 'usr.bin/uname')
-rw-r--r--usr.bin/uname/uname.16
-rw-r--r--usr.bin/uname/uname.c3
2 files changed, 7 insertions, 2 deletions
diff --git a/usr.bin/uname/uname.1 b/usr.bin/uname/uname.1
index eb5376e..f224e88 100644
--- a/usr.bin/uname/uname.1
+++ b/usr.bin/uname/uname.1
@@ -39,7 +39,7 @@
.Nd display information about the system
.Sh SYNOPSIS
.Nm
-.Op Fl amnrsv
+.Op Fl amnprsv
.Sh DESCRIPTION
The
.Nm
@@ -63,6 +63,10 @@ were specified.
Write the type of the current hardware platform to standard output.
.It Fl n
Write the name of the system to standard output.
+.It Fl p
+Writes out the same value as
+.Fl m .
+This option is provided for backward compatibility with SVR4.
.It Fl r
Write the current release level of the operating system
to standard output.
diff --git a/usr.bin/uname/uname.c b/usr.bin/uname/uname.c
index 1245560..feb3c2b 100644
--- a/usr.bin/uname/uname.c
+++ b/usr.bin/uname/uname.c
@@ -67,11 +67,12 @@ main(argc, argv)
char *p, *prefix, buf[1024];
flags = 0;
- while ((ch = getopt(argc, argv, "amnrsv")) != -1)
+ while ((ch = getopt(argc, argv, "amnprsv")) != -1)
switch(ch) {
case 'a':
flags |= (MFLAG | NFLAG | RFLAG | SFLAG | VFLAG);
break;
+ case 'p':
case 'm':
flags |= MFLAG;
break;
OpenPOWER on IntegriCloud