Sign in
fuchsia
/
fuchsia
/
148cbb762deef2800885aed4295712ca6959b6a4
/
.
/
zircon
/
third_party
/
ulib
/
musl
/
src
/
unistd
/
ttyname.c
blob: 1af26010ad12f0f393d81c654fc69e4f1a714b63 [
file
] [
log
] [
blame
]
#include
<errno.h>
#include
<limits.h>
#include
<unistd.h>
char
*
ttyname
(
int
fd
)
{
static
char
buf
[
TTY_NAME_MAX
];
int
result
;
if
((
result
=
ttyname_r
(
fd
,
buf
,
sizeof
buf
)))
{
errno
=
result
;
return
NULL
;
}
return
buf
;
}