use snprintf to create tty path string for getty
Merge branch 'sprintf' into master.