Add a -p option which is the same as the -m option but provided

for SVR4 compatibility.

PR:		5826
This commit is contained in:
Steve Price 1998-02-24 16:57:49 +00:00
parent 5114f1d7c6
commit 7db98de957
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=33792
2 changed files with 7 additions and 2 deletions

View File

@ -39,7 +39,7 @@
.Nd display information about the system .Nd display information about the system
.Sh SYNOPSIS .Sh SYNOPSIS
.Nm .Nm
.Op Fl amnrsv .Op Fl amnprsv
.Sh DESCRIPTION .Sh DESCRIPTION
The The
.Nm .Nm
@ -63,6 +63,10 @@ were specified.
Write the type of the current hardware platform to standard output. Write the type of the current hardware platform to standard output.
.It Fl n .It Fl n
Write the name of the system to standard output. 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 .It Fl r
Write the current release level of the operating system Write the current release level of the operating system
to standard output. to standard output.

View File

@ -67,11 +67,12 @@ main(argc, argv)
char *p, *prefix, buf[1024]; char *p, *prefix, buf[1024];
flags = 0; flags = 0;
while ((ch = getopt(argc, argv, "amnrsv")) != -1) while ((ch = getopt(argc, argv, "amnprsv")) != -1)
switch(ch) { switch(ch) {
case 'a': case 'a':
flags |= (MFLAG | NFLAG | RFLAG | SFLAG | VFLAG); flags |= (MFLAG | NFLAG | RFLAG | SFLAG | VFLAG);
break; break;
case 'p':
case 'm': case 'm':
flags |= MFLAG; flags |= MFLAG;
break; break;