* archival/bunzip2.c (bunzip2_main): Do not remove files if writing to standard
[oweals/busybox.git] / coreutils / sync.c
index 33c79228d7108f5398aee9492cd9824f8dccd3ce..d5816806569ee2d6b2968d1fc19896955ad0f9d5 100644 (file)
@@ -2,7 +2,6 @@
 /*
  * Mini sync implementation for busybox
  *
- *
  * Copyright (C) 1995, 1996 by Bruce Perens <bruce@pixar.com>.
  *
  * This program is free software; you can redistribute it and/or modify
  *
  */
 
-#include "internal.h"
 #include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include "busybox.h"
 
 extern int sync_main(int argc, char **argv)
 {
-       if (argc > 1 && **(argv + 1) == '-') {
-               usage("sync\n"
-#ifndef BB_FEATURE_TRIVIAL_HELP
-                               "\nWrite all buffered filesystem blocks to disk.\n"
-#endif
-                               );
-       }
-       exit(sync());
+       if (argc > 1 && **(argv + 1) == '-')
+               show_usage();
+       sync();
+       return(EXIT_SUCCESS);
 }