Date: Tue, 26 Jan 2010 20:02:53 +0000 (UTC) From: Ed Maste <emaste@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r203042 - head/usr.bin/uname Message-ID: <201001262002.o0QK2rau089428@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: emaste Date: Tue Jan 26 20:02:53 2010 New Revision: 203042 URL: http://svn.freebsd.org/changeset/base/203042 Log: Allow -o as a synonym for -s, for compatibility with other systems. Using -s is preferred, but some existing scripts and makefiles expect to get the system name from uname -o. Reviewed by: imp Modified: head/usr.bin/uname/uname.1 head/usr.bin/uname/uname.c Modified: head/usr.bin/uname/uname.1 ============================================================================== --- head/usr.bin/uname/uname.1 Tue Jan 26 19:49:03 2010 (r203041) +++ head/usr.bin/uname/uname.1 Tue Jan 26 20:02:53 2010 (r203042) @@ -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 @@ -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: head/usr.bin/uname/uname.c ============================================================================== --- head/usr.bin/uname/uname.c Tue Jan 26 19:49:03 2010 (r203041) +++ head/usr.bin/uname/uname.c Tue Jan 26 20:02:53 2010 (r203042) @@ -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':
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201001262002.o0QK2rau089428>