From: Jiri Slaby Date: Fri, 11 Jan 2013 11:06:27 +0000 (+0100) Subject: pty: return EINVAL for TIOCGPTN for BSD ptys X-Git-Tag: v3.8-rc5~38^2~1 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ded2f295a36d17838fe97e80d7b6ea83381474f8;p=pandora-kernel.git pty: return EINVAL for TIOCGPTN for BSD ptys Commit bbb63c514a3464342967237a51a21ea8f61ab951 (drivers:tty:fix up ENOIOCTLCMD error handling) changed the default return value from tty ioctl to be ENOTTY and not EINVAL. This is appropriate. But in case of TIOCGPTN for the old BSD ptys glibc started failing because it expects EINVAL to be returned. Only then it continues to obtain the pts name the other way around. So fix this case by explicit return of EINVAL in this case. Signed-off-by: Jiri Slaby Reported-by: Florian Westphal Cc: Alan Cox Cc: stable # 3.7+ Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed