svn commit: r210566 - stable/8/usr.bin/uname

Attilio Rao attilio at FreeBSD.org
Wed Jul 28 15:55:14 UTC 2010


Author: attilio
Date: Wed Jul 28 15:55:14 2010
New Revision: 210566
URL: http://svn.freebsd.org/changeset/base/210566

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

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

Modified: stable/8/usr.bin/uname/uname.1
==============================================================================
--- stable/8/usr.bin/uname/uname.1	Wed Jul 28 15:47:32 2010	(r210565)
+++ stable/8/usr.bin/uname/uname.1	Wed Jul 28 15:55:14 2010	(r210566)
@@ -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/8/usr.bin/uname/uname.c
==============================================================================
--- stable/8/usr.bin/uname/uname.c	Wed Jul 28 15:47:32 2010	(r210565)
+++ stable/8/usr.bin/uname/uname.c	Wed Jul 28 15:55:14 2010	(r210566)
@@ -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);
 }


More information about the svn-src-all mailing list