File: MAKEDEV-cpuid-msr

package info (click to toggle)
msr-tools 1.2-2
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 64 kB
  • ctags: 27
  • sloc: ansic: 370; makefile: 22; sh: 9
file content (11 lines) | stat: -rwxr-xr-x 231 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
#!/bin/sh
msr_major=202
cpuid_major=203
n=0
while [ $n -lt 32 ]; do
    mkdir -m 0755 -p /dev/cpu/$n
    mknod /dev/cpu/$n/msr -m 0600 c $msr_major $n
    mknod /dev/cpu/$n/cpuid -m 0444 c $cpuid_major $n
    n=`expr $n + 1`
done