Fix some formatting
[oweals/busybox.git] / touch.c
diff --git a/touch.c b/touch.c
index afdd265f742e82ca66a526114b2c9c7743a08e4b..fa2f3b6092c952c26329432a33742292c86559f5 100644 (file)
--- a/touch.c
+++ b/touch.c
  *
  */
 
-#include "internal.h"
+#include "busybox.h"
 #include <stdio.h>
 #include <sys/types.h>
-#include <sys/stat.h>
 #include <fcntl.h>
 #include <utime.h>
 #include <errno.h>
+#include <unistd.h>
+#include <stdlib.h>
 
 extern int touch_main(int argc, char **argv)
 {
@@ -44,7 +45,6 @@ extern int touch_main(int argc, char **argv)
                                break;
                        default:
                                usage(touch_usage);
-                               exit(FALSE);
                        }
                }
        }
@@ -58,18 +58,18 @@ extern int touch_main(int argc, char **argv)
                                S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH);
                if (fd < 0) {
                        if (create == FALSE && errno == ENOENT)
-                               exit(TRUE);
+                               return EXIT_SUCCESS;
                        else {
-                               fatalError("%s", strerror(errno));
+                               perror_msg_and_die("%s", *argv);
                        }
                }
                close(fd);
                if (utime(*argv, NULL)) {
-                       fatalError("%s", strerror(errno));
+                       perror_msg_and_die("%s", *argv);
                }
                argc--;
                argv++;
        }
 
-       return(TRUE);
+       return EXIT_SUCCESS;
 }