Sophie

Sophie

distrib > Fedora > 18 > i386 > by-pkgid > 21b744155c03a240ef0ea458aef35c9d > files > 805

systemtap-client-2.2.1-1.fc18.i686.rpm

#!/usr/bin/stap

# This is not useful, but it demonstrates that
# Systemtap can modify variables in a running kernel.

# Usage: ./keyhack.stp -g

probe kernel.function("kbd_event") {
  # Changes 'm' to 'b' .
  if ($event_code == 50) $event_code = 48
}

probe end {
  printf("\nDONE\n")
}