Subversion Repositories planix.SVN

Rev

Rev 2 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 - 1
#include <u.h>
2
#include <libc.h>
3
/*
4
 * Print working (current) directory
5
 */
6
 
7
void
8
main(int argc, char *argv[])
9
{
10
	char pathname[512];
11
 
12
	USED(argc, argv);
13
	if(getwd(pathname, sizeof(pathname)) == 0) {
14
		fprint(2, "pwd: %r\n");
15
		exits("getwd");
16
	}
17
	print("%s\n", pathname);
18
	exits(0);
19
}