aboutsummaryrefslogtreecommitdiff
path: root/coreutils/pwd.c
diff options
context:
space:
mode:
authormjn3 <mjn3@69ca8d6d-28ef-0310-b511-8ec308f3f277>2003-03-19 09:13:01 +0000
committermjn3 <mjn3@69ca8d6d-28ef-0310-b511-8ec308f3f277>2003-03-19 09:13:01 +0000
commite901c15d890dbbdce4c086963cb1513653fc46b5 (patch)
treea318d0f03aa076c74b576ea45dc543a5669e8e91 /coreutils/pwd.c
parent40758c00616c3b2c85d83eb4afdeb04b1f65c9f1 (diff)
downloadbusybox-w32-e901c15d890dbbdce4c086963cb1513653fc46b5.tar.gz
busybox-w32-e901c15d890dbbdce4c086963cb1513653fc46b5.tar.bz2
busybox-w32-e901c15d890dbbdce4c086963cb1513653fc46b5.zip
Major coreutils update.
git-svn-id: svn://busybox.net/trunk/busybox@6751 69ca8d6d-28ef-0310-b511-8ec308f3f277
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}