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

int
close(int fd)
{
	if(waserror()){
		if(pm_debug & PmDebugFd)
			fprint(2, "pm_close %d: %r\n", fd);
		return -1;
	}
	cclose(closefd2chan(fd));
	poperror();
	return 0;
}

