From owner-freebsd-bugs@FreeBSD.ORG Sun Feb 13 05:53:46 2005 Return-Path: Delivered-To: freebsd-bugs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 018D716A4CE for ; Sun, 13 Feb 2005 05:53:46 +0000 (GMT) Received: from VARK.MIT.EDU (VARK.MIT.EDU [18.95.3.179]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9682943D48 for ; Sun, 13 Feb 2005 05:53:45 +0000 (GMT) (envelope-from das@FreeBSD.ORG) Received: from VARK.MIT.EDU (localhost [127.0.0.1]) by VARK.MIT.EDU (8.13.1/8.13.1) with ESMTP id j1D5rffV067302; Sun, 13 Feb 2005 00:53:41 -0500 (EST) (envelope-from das@FreeBSD.ORG) Received: (from das@localhost) by VARK.MIT.EDU (8.13.1/8.13.1/Submit) id j1D5rZ5H067301; Sun, 13 Feb 2005 00:53:35 -0500 (EST) (envelope-from das@FreeBSD.ORG) Date: Sun, 13 Feb 2005 00:53:35 -0500 From: David Schultz To: Bruce Evans Message-ID: <20050213055335.GA67206@VARK.MIT.EDU> Mail-Followup-To: Bruce Evans , freebsd-bugs@FreeBSD.ORG References: <200502111410.j1BEATUL015405@freefall.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200502111410.j1BEATUL015405@freefall.freebsd.org> cc: freebsd-bugs@FreeBSD.ORG Subject: Re: kern/77355: Detect i*86 subarches for uname X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Feb 2005 05:53:46 -0000 On Fri, Feb 11, 2005, Bruce Evans wrote: > It is needed for correctness. From "man uname | col -bx": > > %%% > -m Write the type of the current hardware platform to standard out- > put. > ... > -p Write the type of the machine processor architecture to standard > output. > %%% > > -p is supposed to give the arch (e.g., -i386) and -m is supposed to > give the platfrom (is that the sub-arch?) (e.g., i686). It is useless > for these to return the same string. (i686 is also useless, since it > is the same for all i386's newer than about 8 years old, but that is > another bug. The hw.model sysctl gives more useful info (e.g., > "AMD Athlon(tm)"), but uname(1) only uses uname(2) which doesn't go > near this sysctl.) FWIW, Linux gets this wrong in the other direction (i686 for both.) Solaris does better. Here are some data points: das@sygyt:~> uname -a Linux sygyt 2.4.22-1.2194.nptl #1 Thu Jun 17 10:58:40 EDT 2004 i686 i686 i386 GNU/Linux das@sygyt:~> uname -m i686 das@sygyt:~> uname -p i686 das@VARK:~> uname -a FreeBSD VARK.MIT.EDU 6.0-CURRENT FreeBSD 6.0-CURRENT #39: Sat Feb 12 04:37:35 EST 2005 das@VARK.MIT.EDU:/usr/home/t/freebsd/vark/usr/home/t/freebsd/vark/src/sys/GENERIC i386 das@VARK:~> uname -m i386 das@VARK:~> uname -p i386 athena% uname -a SunOS biohazard-cafe.mit.edu 5.9 Generic_117171-14 sun4u sparc SUNW,Sun-Fire-V440 athena% uname -m sun4u athena% uname -p sparc