# Empatch - patch a kernel so that the emulator is enabled.
#
# This involves patching three function pointers that are initially null:
#
# ndpEmFn:	becomes address of math_emulate()
# ndpKfsave:	becomes address of kfsave()
# ndpKfrstor:	becomes address of kfrstor()
KER=${1-/tx}
echo "Enabling emulator in $KER"

/conf/patch -v $KER "ndpEmFn=math_emulate" "ndpKfsave=kfsave" \
  "ndpKfrstor=kfrstor"
