mirror of
git://sourceware.org/git/glibc.git
synced 2025-04-06 14:10:30 +08:00
hurd: make ptsname fail with ENOTTY on non-master-pty
This commit is contained in:
parent
3b13266f14
commit
b4fcf0475b
@ -46,6 +46,14 @@ __ptsname_internal (int fd, char *buf, size_t buflen, struct stat64 *stp)
|
||||
string_t peername;
|
||||
size_t len;
|
||||
error_t err;
|
||||
int ttype;
|
||||
|
||||
if (HURD_DPORT_USE (fd, __term_get_bottom_type (port, &ttype)) == 0)
|
||||
{
|
||||
/* get_bottom_type suceeded, this is the slave side. */
|
||||
errno = ENOTTY;
|
||||
return ENOTTY;
|
||||
}
|
||||
|
||||
if (err = HURD_DPORT_USE (fd, __term_get_peername (port, peername)))
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user