2020/* /dev/ptyp0 master (PTY) open */
2121int pty_open (struct inode * inode , struct file * file )
2222{
23- register struct tty * otty ;
23+ register struct tty * tty ;
2424
25- if (!(otty = determine_tty (inode -> i_rdev ))) {
25+ if (!(tty = determine_tty (inode -> i_rdev ))) {
2626 debug ("pty open fail NODEV\n" );
2727 return - ENODEV ;
2828 }
29- if (otty -> flags & TTY_OPEN ) {
29+ if (tty -> flags & TTY_OPEN ) {
3030 debug ("pty open fail BUSY\n" );
3131 return - EBUSY ;
3232 }
@@ -36,11 +36,11 @@ int pty_open(struct inode *inode, struct file *file)
3636/* /dev/ptyp0 master close */
3737void pty_release (struct inode * inode , struct file * file )
3838{
39- register struct tty * otty ;
39+ register struct tty * tty ;
4040
4141 debug ("pty release\n" );
42- if ((otty = determine_tty (inode -> i_rdev )))
43- kill_pg (otty -> pgrp , SIGHUP , 1 );
42+ if ((tty = determine_tty (inode -> i_rdev )))
43+ kill_pg (tty -> pgrp , SIGHUP , 1 );
4444}
4545
4646/* /dev/ptyp0 master select */
@@ -94,7 +94,7 @@ size_t pty_read (struct inode *inode, struct file *file, char *data, size_t len)
9494 break ;
9595 }
9696
97- put_user_char (tty_outproc (tty ), ( void * )( data ++ ) );
97+ put_user_char (tty_outproc (tty ), data ++ );
9898 count ++ ;
9999 }
100100
0 commit comments