shithub: riscv

ref: 45e2b4dfe9570aefe3e5f2a8b7af956b7365f522
dir: /sys/src/ape/lib/ap/plan9/ttyname.c/

View raw version
#include <unistd.h>
#include <stdio.h>

char *
ttyname(int fd)
{
	static char buf[100];

	sprintf(buf, "/fd/%d", fd);
	return buf;
}