OpenOrbis / mira-project

mira rewrite in cxx
GNU General Public License v3.0
290 stars 65 forks source link

Kernel: use correct deci_tty_write hook offset in 9.00 #164

Open pipehuffer opened 1 year ago

pipehuffer commented 1 year ago

The TTYRedirector plugin uses printf_hook's offset to replace in the deci_tty_cdev's struct cdevsw instance, the d_write field. This patch sets the offset to the d_write field itself, where it previously was pointing to the start of the cdevsw instance.

This affects firmware version 9.00. Tested with LLVM 16.0.3 and on top of the chendo-offset-fix branch and #162