File: MAKEDEV-cpuid-msr

package info (click to toggle)
msr-tools 1.3-2
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd, stretch
  • size: 76 kB
  • ctags: 48
  • sloc: ansic: 585; makefile: 23; 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