Added some more '/* getopt not needed */' lines.
[oweals/busybox.git] / pwd.c
diff --git a/pwd.c b/pwd.c
index 00163178b6077b59436a9e798fd56f1252701cf6..a7a5f78a1771b847bfcb895792bf0c3573818832 100644 (file)
--- a/pwd.c
+++ b/pwd.c
  *
  */
 
-#include "internal.h"
 #include <stdio.h>
 #include <dirent.h>
-#include <sys/param.h>
+#include <errno.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include "busybox.h"
 
 extern int pwd_main(int argc, char **argv)
 {
-       char buf[PATH_MAX + 1];
+       char buf[BUFSIZ + 1];
 
-       if (getcwd(buf, sizeof(buf)) == NULL) {
-               perror("get working directory");
-               exit(FALSE);
-       }
+       if (getcwd(buf, sizeof(buf)) == NULL)
+               perror_msg_and_die("getcwd");
 
-       printf("%s\n", buf);
-       exit(TRUE);
+       puts(buf);
+       return EXIT_SUCCESS;
 }