Brand new version of xargs. Tested thoroughly by Kent Robotti. (Domo arigato,
[oweals/busybox.git] / pwd.c
diff --git a/pwd.c b/pwd.c
index e77a0ca70e5af5136031a0b8633406bd840a874f..c9de7778eec0765c75a1da43a1d2e4a553b560b9 100644 (file)
--- a/pwd.c
+++ b/pwd.c
  *
  */
 
-#include "internal.h"
+#include "busybox.h"
 #include <stdio.h>
 #include <dirent.h>
+#include <errno.h>
 
 extern int pwd_main(int argc, char **argv)
 {
        char buf[BUFSIZ + 1];
 
-       if (getcwd(buf, sizeof(buf)) == NULL) {
-               perror("get working directory");
-               exit(FALSE);
-       }
+       if (getcwd(buf, sizeof(buf)) == NULL)
+               fatalError("%s\n", strerror(errno));
 
        printf("%s\n", buf);
-       exit(TRUE);
+       return(TRUE);
 }