added tty functions

added functions are same weston
Merge branch 'master' of github.com:ad960009/libyutani