From owner-cvs-all Wed Sep 12 23:11:27 2001 Delivered-To: cvs-all@freebsd.org Received: from whale.sunbay.crimea.ua (whale.sunbay.crimea.ua [212.110.138.65]) by hub.freebsd.org (Postfix) with ESMTP id D4E6F37B409; Wed, 12 Sep 2001 23:11:15 -0700 (PDT) Received: (from ru@localhost) by whale.sunbay.crimea.ua (8.11.2/8.11.2) id f8D6Ahg14468; Thu, 13 Sep 2001 09:10:43 +0300 (EEST) (envelope-from ru) Date: Thu, 13 Sep 2001 09:10:43 +0300 From: Ruslan Ermilov To: Warner Losh Cc: Marcel Moolenaar , cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: hw.machine vs hw.machine_arch (was: Re: cvs commit: src/sbin/reboot Makefile) Message-ID: <20010913091043.C10963@sunbay.com> References: <200109122216.f8CMGLt43250@harmony.village.org> <20010912134640.A639@dhcp01.pn.xcllnt.net> <200109121221.f8CCL9q93334@freefall.freebsd.org> <200109122216.f8CMGLt43250@harmony.village.org> <200109122218.f8CMIst43283@harmony.village.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <200109122218.f8CMIst43283@harmony.village.org>; from imp@harmony.village.org on Wed, Sep 12, 2001 at 04:18:54PM -0600 Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Wed, Sep 12, 2001 at 04:18:54PM -0600, Warner Losh wrote: > In message <200109122216.f8CMGLt43250@harmony.village.org> Warner Losh writes: > : : > Use ${MACHINE}, it works with cross-builds. > : : > : : More specifically, ${MACHINE} can be pc98 while ${MACHINE_ARCH} > : : is i386. In userland you want to test for i386; not pc98. > : > : uname -m is the ${MACHINE_ARCH}, so that should be used instead. > : Marcel is right. > > I just confirmed on my pc98 machine. arch -m is "i386" on pc98. > Hmm, I always thought that hw.machine_arch should be what the ${MACHINE_ARCH} is set to during `buildworld', and hw.machine should be what the ${MACHINE} is. And we know that the only exotic combination currently is i386/pc98. Well, well... `uname -m' fetches the value of: if (flags & MFLAG) { mib[0] = CTL_HW; mib[1] = HW_MACHINE; ... Not the HW_MACHINE_ARCH. But then in sys/i386/i386/identcpu.c (which is also in files.pc98) we have: char machine[] = "i386"; SYSCTL_STRING(_hw, HW_MACHINE, machine, CTLFLAG_RD, machine, 0, "Machine class"); I wonder, should that be "pc98" for PC98's. Anyone cares to explain why it is "i386" on PC98, and why then we have both hw.machine and hw.machine_arch? Thanks, -- Ruslan Ermilov Oracle Developer/DBA, ru@sunbay.com Sunbay Software AG, ru@FreeBSD.org FreeBSD committer, +380.652.512.251 Simferopol, Ukraine http://www.FreeBSD.org The Power To Serve http://www.oracle.com Enabling The Information Age To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message