projects
/
oweals
/
busybox.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
More stuff...
[oweals/busybox.git]
/
coreutils
/
pwd.c
1
#include "internal.h"
2
#include <stdio.h>
3
#include <dirent.h>
4
5
const char pwd_usage[] = "Print the current directory.\n";
6
7
extern int
8
pwd_main(int argc, char * * argv)
9
{
10
char buf[NAME_MAX];
11
12
if ( getcwd(buf, sizeof(buf)) == NULL ) {
13
perror("get working directory");
14
exit( FALSE);
15
}
16
17
printf("%s\n", buf);
18
exit( TRUE);
19
}