File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change 11
11
12
12
static void print_string (char * str )
13
13
{
14
- struct tty_struct * my_tty ;
15
- const struct tty_operations * ttyops ;
16
-
17
- /* The tty for the current task, for 2.6.6+ kernels */
18
- my_tty = get_current_tty ();
19
- ttyops = my_tty -> driver -> ops ;
14
+ /* The tty for the current task */
15
+ struct tty_struct * my_tty = get_current_tty ();
20
16
21
17
/* If my_tty is NULL, the current task has no tty you can print to (i.e.,
22
18
* if it is a daemon). If so, there is nothing we can do.
23
19
*/
24
20
if (my_tty ) {
21
+ const struct tty_operations * ttyops = my_tty -> driver -> ops ;
25
22
/* my_tty->driver is a struct which holds the tty's functions,
26
23
* one of which (write) is used to write strings to the tty.
27
24
* It can be used to take a string either from the user's or
You can’t perform that action at this time.
0 commit comments