FreeBSD Bugzilla – Attachment 16427 Details for
Bug 30116
New Port: x86info shows interesting info about the 80x86 processors on the machine
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
file.shar
file.shar (text/plain), 3.56 KB, created by
Erik Greenwald
on 2001-08-27 06:20:00 UTC
(
hide
)
Description:
file.shar
Filename:
MIME Type:
Creator:
Erik Greenwald
Created:
2001-08-27 06:20:00 UTC
Size:
3.56 KB
patch
obsolete
># This is a shell archive. Save it in a file, remove anything before ># this line, and then unpack it by entering "sh file". Note, it may ># create directories; files and directories will be owned by you and ># have default permissions. ># ># This archive contains: ># ># x86info ># x86info/Makefile ># x86info/files ># x86info/files/patch-aa ># x86info/distinfo ># x86info/pkg-plist ># x86info/pkg-comment ># x86info/pkg-descr ># >echo c - x86info >mkdir -p x86info > /dev/null 2>&1 >echo x - x86info/Makefile >sed 's/^X//' >x86info/Makefile << 'END-of-x86info/Makefile' >X# Ports collection makefile for: x86info >X# Date created: 26 Aug 2001 >X# Whom: Erik Greenwald <erik@smluc.org> >X# >X# $FreeBSD$ >X# >X >XPORTNAME= x86info >XPORTVERSION= 1.4 >XCATEGORIES= sysutils >XMASTER_SITES= ${MASTER_SITE_SOURCEFORGE} >XMASTER_SITE_SUBDIR=x86info >XEXTRACT_SUFX= .tgz >X >XMAINTAINER= erik@smluc.org >X >Xdo-install: >X ${INSTALL} ${COPY} ${STRIP} -o ${BINOWN} -g ${BINGRP} -m 755 ${WRKSRC}/x86info ${PREFIX}/bin >X >X.include <bsd.port.mk> >END-of-x86info/Makefile >echo c - x86info/files >mkdir -p x86info/files > /dev/null 2>&1 >echo x - x86info/files/patch-aa >sed 's/^X//' >x86info/files/patch-aa << 'END-of-x86info/files/patch-aa' >X--- Makefile.orig Thu Jul 26 14:40:46 2001 >X+++ Makefile Sun Aug 26 23:11:15 2001 >X@@ -23,5 +23,9 @@ >X x86info: $(OBJS) >X gcc -o x86info $(OBJS) >X >X+.c.o: >X+ gcc $(CFLAGS) -o $@ -c $< >X+ >X+ >X clean: >X rm -f *.o x86info >Xdiff -urNb x86info.c x86info.c >X--- x86info.c.orig Thu Jul 26 14:40:46 2001 >X+++ x86info.c Sun Aug 26 23:12:02 2001 >X@@ -11,6 +11,10 @@ >X #include <string.h> >X #include <stdlib.h> >X #include <unistd.h> >X+#ifndef linux >X+#include <sys/types.h> >X+#include <sys/sysctl.h> >X+#endif >X #include "x86info.h" >X >X int show_msr=0; >X@@ -89,7 +93,21 @@ >X return(0); >X } >X >X+#if defined _SC_NPROCESSORS /* linux */ >X nrCPUs = sysconf (_SC_NPROCESSORS_CONF); >X+#elif defined HW_NCPU /* bsd */ >X+ { >X+ int mib[2] = { CTL_HW, HW_NCPU }; >X+ size_t len; >X+ >X+ len = sizeof(nrCPUs); >X+ sysctl(mib, 2, &nrCPUs, &len, NULL, 0); >X+ } >X+#else >X+ /* unknown interface to count cpu's */ >X+ nrCPUs=1; >X+#endif >X+ >X printf ("Found %d CPU", nrCPUs); >X if (nrCPUs > 1) >X printf ("s"); >Xdiff -urNb x86info.h x86info.h >X--- x86info.h.orig Thu Jul 26 14:40:46 2001 >X+++ x86info.h Sun Aug 26 23:12:33 2001 >X@@ -3,7 +3,12 @@ >X * May be used under the terms of the GNU Public License (GPL) >X */ >X >X+#ifdef linux >X #include <linux/types.h> >X+#else >X+#include <machine/types.h> >X+#define __u32 int >X+#endif >X >X typedef __u32 u32; >X >END-of-x86info/files/patch-aa >echo x - x86info/distinfo >sed 's/^X//' >x86info/distinfo << 'END-of-x86info/distinfo' >XMD5 (x86info-1.4.tgz) = 9921a0932a1f0eda4587a1046ca92217 >END-of-x86info/distinfo >echo x - x86info/pkg-plist >sed 's/^X//' >x86info/pkg-plist << 'END-of-x86info/pkg-plist' >Xbin/x86info >END-of-x86info/pkg-plist >echo x - x86info/pkg-comment >sed 's/^X//' >x86info/pkg-comment << 'END-of-x86info/pkg-comment' >XUtility to display information about the systems x86 processor(s) >END-of-x86info/pkg-comment >echo x - x86info/pkg-descr >sed 's/^X//' >x86info/pkg-descr << 'END-of-x86info/pkg-descr' >XThe x86info utility displays information about each of the systems 80x86 >Xprocessors. Cache info, flags, registers, msr's, and processor >Xname/family/model are all displayed. >END-of-x86info/pkg-descr >exit
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 30116
: 16427