more bugs fixed -- found doing regression testing
[oweals/busybox.git] / coreutils / pwd.c
index 1a023d383377f98b15c84d5d4be24b5f860a0ae7..da089f37c89de894bc126159b8ead12d37c64cde 100644 (file)
@@ -21,7 +21,7 @@
  *
  */
 
-#include "internal.h"
+#include "busybox.h"
 #include <stdio.h>
 #include <dirent.h>
 #include <errno.h>
@@ -30,12 +30,9 @@ extern int pwd_main(int argc, char **argv)
 {
        char buf[BUFSIZ + 1];
 
-       if (argc > 1 && strcmp(argv[1], "--help") == 0)
-               usage(pwd_usage);
-
        if (getcwd(buf, sizeof(buf)) == NULL)
-               fatalError("%s\n", strerror(errno));
+               perror_msg_and_die("getcwd");
 
-       printf("%s\n", buf);
-       return(TRUE);
+       puts(buf);
+       return EXIT_SUCCESS;
 }