#include <9pm/u.h>
#include <9pm/libc.h>

void
main(int argc, char **argv)
{
	char buf[100];

	if(argc > 1){
		close(0);
		open(argv[1], OREAD);
	}
	if(fd2path(0, buf, sizeof buf) < 0)
		fprint(2, "fd2path: %r\n");
	else
		print("%s\n", buf);
}
