Sophie

Sophie

distrib > Mageia > 1 > i586 > by-pkgid > fe7c341633b7d979ab8178b22304d6b5 > files > 29

systemtap-1.3-1.1.mga1.i586.rpm

#! /usr/bin/env 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")
}