aboutsummaryrefslogtreecommitdiff
path: root/coreutils/pwd.c
diff options
context:
space:
mode:
authorManuel Novoa III <mjn3@codepoet.org>2003-03-19 09:13:01 +0000
committerManuel Novoa III <mjn3@codepoet.org>2003-03-19 09:13:01 +0000
commitcad5364599eb5062d59e0c397ed638ddd61a8d5d (patch)
treea318d0f03aa076c74b576ea45dc543a5669e8e91 /coreutils/pwd.c
parente01f9662a5bd5d91be4f6b3941b57fff73cd5af1 (diff)
downloadbusybox-w32-cad5364599eb5062d59e0c397ed638ddd61a8d5d.tar.gz
busybox-w32-cad5364599eb5062d59e0c397ed638ddd61a8d5d.tar.bz2
busybox-w32-cad5364599eb5062d59e0c397ed638ddd61a8d5d.zip
Major coreutils update.
Diffstat (limited to 'coreutils/pwd.c')
-rw-r--r--coreutils/pwd.c16
1 files changed, 5 insertions, 11 deletions
diff --git a/coreutils/pwd.c b/coreutils/pwd.c
index 9c5d70cef..7e0dc056a 100644
--- a/coreutils/pwd.c
+++ b/coreutils/pwd.c
@@ -20,24 +20,18 @@
20 * 20 *
21 */ 21 */
22 22
23/* getopt not needed */
24
25#include <stdio.h> 23#include <stdio.h>
26#include <dirent.h>
27#include <errno.h>
28#include <unistd.h>
29#include <stdlib.h> 24#include <stdlib.h>
30#include "busybox.h" 25#include "busybox.h"
31 26
32extern int pwd_main(int argc, char **argv) 27extern int pwd_main(int argc, char **argv)
33{ 28{
34 static char *buf; 29 char *buf;
35 30
36 buf = xgetcwd(buf); 31 if ((buf = xgetcwd(NULL)) != NULL) {
37
38 if (buf != NULL) {
39 puts(buf); 32 puts(buf);
40 return EXIT_SUCCESS; 33 bb_fflush_stdout_and_exit(EXIT_SUCCESS);
41 } 34 }
35
42 return EXIT_FAILURE; 36 return EXIT_FAILURE;
43} 37}