Rewrite tty driver