File: testnodes

package info (click to toggle)
x86info 1.18-2
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 468 kB
  • ctags: 442
  • sloc: ansic: 3,978; makefile: 115; asm: 67; sh: 38
file content (24 lines) | stat: -rwxr-xr-x 490 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/sh
# FIXME: Don't spit out these warnings on *BSD / Win32.

NRNODES=`grep processor /proc/cpuinfo | wc -l`
need=0

for i in `seq 0 $(( $NRNODES - 1 ))`
do
	if [ ! -c /dev/cpu/$i/cpuid ] ; then
		echo "*** No /dev/cpu/$i/cpuid found."
		need=1
	fi

	if [ ! -c /dev/cpu/$i/msr ] ; then
		echo "*** No /dev/cpu/$i/msr found."
		need=1
	fi
done

if test "$need" -eq 1 ; then
	echo "type \"make nodes\" as root to install device nodes"
	echo "You will also need msr driver installed"
fi