Warning: Attempt to read property "date" on null in /usr/local/www/websvn.planix.org/blame.php on line 247

Warning: Attempt to read property "msg" on null in /usr/local/www/websvn.planix.org/blame.php on line 247
WebSVN – planix.SVN – Blame – /os/branches/feature_tlsv12/sys/src/libc/9sys/getwd.c – Rev 2

Subversion Repositories planix.SVN

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 - 1
#include <u.h>
2
#include <libc.h>
3
 
4
static char *nsgetwd(char*, int);
5
 
6
char*
7
getwd(char *buf, int nbuf)
8
{
9
	int n, fd;
10
 
11
	fd = open(".", OREAD);
12
	if(fd < 0)
13
		return nil;
14
	n = fd2path(fd, buf, nbuf);
15
	close(fd);
16
	if(n < 0)
17
		return nil;
18
	return buf;
19
}