diff options
Diffstat (limited to 'pwd.c')
-rw-r--r-- | pwd.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -4,15 +4,15 @@ | |||
4 | const char pwd_usage[] = "Print the current directory.\n"; | 4 | const char pwd_usage[] = "Print the current directory.\n"; |
5 | 5 | ||
6 | extern int | 6 | extern int |
7 | pwd_main(struct FileInfo * i, int argc, char * * argv) | 7 | pwd_main(int argc, char * * argv) |
8 | { | 8 | { |
9 | char buf[1024]; | 9 | char buf[1024]; |
10 | 10 | ||
11 | if ( getcwd(buf, sizeof(buf)) == NULL ) { | 11 | if ( getcwd(buf, sizeof(buf)) == NULL ) { |
12 | name_and_error("get working directory"); | 12 | perror("get working directory"); |
13 | return 1; | 13 | exit( FALSE); |
14 | } | 14 | } |
15 | 15 | ||
16 | printf("%s\n", buf); | 16 | printf("%s\n", buf); |
17 | return 0; | 17 | exit( TRUE); |
18 | } | 18 | } |