From owner-freebsd-bugs Sun Apr 14 00:50:07 1996 Return-Path: owner-bugs Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id AAA03003 for bugs-outgoing; Sun, 14 Apr 1996 00:50:07 -0700 (PDT) Received: (from gnats@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id AAA02997 Sun, 14 Apr 1996 00:50:05 -0700 (PDT) Resent-Date: Sun, 14 Apr 1996 00:50:05 -0700 (PDT) Resent-Message-Id: <199604140750.AAA02997@freefall.freebsd.org> Resent-From: gnats (GNATS Management) Resent-To: freebsd-bugs Resent-Reply-To: FreeBSD-gnats@freefall.FreeBSD.org, lyndon@orthanc.com Received: from multivac.orthanc.com (root@multivac.orthanc.com [206.12.238.2]) by freefall.freebsd.org (8.7.3/8.7.3) with ESMTP id AAA02878 for ; Sun, 14 Apr 1996 00:45:36 -0700 (PDT) Received: from orodruin.orthanc.com (root@orodruin.orthanc.com [206.12.238.3]) by multivac.orthanc.com (8.7.3/8.7.3) with ESMTP id AAA03778 for ; Sun, 14 Apr 1996 00:45:31 -0700 (PDT) Received: (from root@localhost) by orodruin.orthanc.com (8.7.5/8.7.3) id AAA01503; Sun, 14 Apr 1996 00:45:29 -0700 (PDT) Message-Id: <199604140745.AAA01503@orodruin.orthanc.com> Date: Sun, 14 Apr 1996 00:45:29 -0700 (PDT) From: Lyndon Nerenberg Reply-To: lyndon@orthanc.com To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.2 Subject: bin/1139: uname.1 and uname.c disagree about display ordering Sender: owner-bugs@freebsd.org X-Loop: FreeBSD.org Precedence: bulk >Number: 1139 >Category: bin >Synopsis: uname.1 and uname.c disagree about display ordering >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sun Apr 14 00:50:02 PDT 1996 >Last-Modified: >Originator: Lyndon Nerenberg >Organization: Orthanc Systems >Release: FreeBSD 2.2-CURRENT i386 >Environment: >Description: uname(1) claims '-a' is the same as '-m -n -r -s -v' however the code displays as '-n -r -s -v -m'. >How-To-Repeat: >Fix: The following patch to /usr/src/usr.bin/uname/uname.c rearranges the flag checks to match the man page. =================================================================== RCS file: uname.c,v retrieving revision 1.1 diff -c -r1.1 uname.c *** uname.c 1996/04/14 07:35:40 1.1 --- uname.c 1996/04/14 07:36:54 *************** *** 102,107 **** --- 102,116 ---- prefix = ""; + if (flags & MFLAG) { + mib[0] = CTL_HW; + mib[1] = HW_MACHINE; + len = sizeof(buf); + if (sysctl(mib, 2, &buf, &len, NULL, 0) == -1) + err(1, "sysctl"); + (void)printf("%s%.*s", prefix, len, buf); + prefix = " "; + } if (flags & SFLAG) { mib[0] = CTL_KERN; mib[1] = KERN_OSTYPE; *************** *** 138,152 **** for (p = buf, tlen = len; tlen--; ++p) if (*p == '\n' || *p == '\t') *p = ' '; - (void)printf("%s%.*s", prefix, len, buf); - prefix = " "; - } - if (flags & MFLAG) { - mib[0] = CTL_HW; - mib[1] = HW_MACHINE; - len = sizeof(buf); - if (sysctl(mib, 2, &buf, &len, NULL, 0) == -1) - err(1, "sysctl"); (void)printf("%s%.*s", prefix, len, buf); prefix = " "; } --- 147,152 ---- >Audit-Trail: >Unformatted: