1

I am new to kernel module programming and got some problem while compiling some old kernel code.

The code is trying to get tty for the current task using current->tty, but when I compile, I get following an error

error: ‘struct task_struct’ has no member named ‘tty’
  my_tty = current->tty;

I checked the linux source code , tty is not there any more.

The 'current' is of task_struct,but tty not in struct task_struct any more. How can I access them in version 3.13.0-24?

msc
  • 33,420
  • 29
  • 119
  • 214
  • 2
    Please refer to this: http://stackoverflow.com/questions/20719713/how-can-i-write-to-tty-from-a-kernel-module Following this LXR the method should be there in 3.13 as well: http://lxr.free-electrons.com/ident?v=3.13;i=get_current_tty – fisehara Sep 27 '16 at 14:23

0 Answers0