Author: attilio
Date: Wed Jul 28 16:32:30 2010
New Revision: 210572
URL: http://svn.freebsd.org/changeset/base/210572

Log:
  MFC r203042, r203735:
  Allow -o as a synonym for -s, for compatibility with other systems.

Modified:
  stable/7/usr.bin/uname/uname.1
  stable/7/usr.bin/uname/uname.c
Directory Properties:
  stable/7/usr.bin/uname/   (props changed)

Modified: stable/7/usr.bin/uname/uname.1
==============================================================================
--- stable/7/usr.bin/uname/uname.1      Wed Jul 28 16:29:10 2010        
(r210571)
+++ stable/7/usr.bin/uname/uname.1      Wed Jul 28 16:32:30 2010        
(r210572)
@@ -32,7 +32,7 @@
 .\"    @(#)uname.1     8.3 (Berkeley) 4/8/94
 .\" $FreeBSD$
 .\"
-.Dd April 2, 2003
+.Dd January 26, 2010
 .Dt UNAME 1
 .Os
 .Sh NAME
@@ -40,7 +40,7 @@
 .Nd display information about the system
 .Sh SYNOPSIS
 .Nm
-.Op Fl aimnprsv
+.Op Fl aimnoprsv
 .Sh DESCRIPTION
 The
 .Nm
@@ -63,6 +63,10 @@ Write the kernel ident to standard outpu
 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 o
+This is a synonym for the
+.Fl s
+option, for compatibility with other systems.
 .It Fl p
 Write the type of the machine processor architecture to standard output.
 .It Fl r

Modified: stable/7/usr.bin/uname/uname.c
==============================================================================
--- stable/7/usr.bin/uname/uname.c      Wed Jul 28 16:29:10 2010        
(r210571)
+++ stable/7/usr.bin/uname/uname.c      Wed Jul 28 16:32:30 2010        
(r210572)
@@ -88,7 +88,7 @@ main(int argc, char *argv[])
        setup_get();
        flags = 0;
 
-       while ((ch = getopt(argc, argv, "aimnprsv")) != -1)
+       while ((ch = getopt(argc, argv, "aimnoprsv")) != -1)
                switch(ch) {
                case 'a':
                        flags |= (MFLAG | NFLAG | RFLAG | SFLAG | VFLAG);
@@ -109,6 +109,7 @@ main(int argc, char *argv[])
                        flags |= RFLAG;
                        break;
                case 's':
+               case 'o':
                        flags |= SFLAG;
                        break;
                case 'v':
@@ -244,6 +245,6 @@ NATIVE_SYSCTLNAME_GET(ident, "kern.ident
 void
 usage(void)
 {
-       fprintf(stderr, "usage: uname [-aimnprsv]\n");
+       fprintf(stderr, "usage: uname [-aimnoprsv]\n");
        exit(1);
 }
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to