Fix malformed build-depends. Update list of bugs to close
[oweals/busybox.git] / sync.c
diff --git a/sync.c b/sync.c
index 145ed1eda8d25f0a8fa901f664dbaa69f77352b6..ee22ae109c5a222dd29a958ef375138f54e4220e 100644 (file)
--- a/sync.c
+++ b/sync.c
@@ -1,3 +1,4 @@
+/* vi: set sw=4 ts=4: */
 /*
  * Mini sync implementation for busybox
  *
  *
  */
 
-#include "internal.h"
 #include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include "busybox.h"
 
-extern int
-sync_main(int argc, char * * argv)
+extern int sync_main(int argc, char **argv)
 {
-    if ( argc>1 && **(argv+1) == '-' ) {
-       usage( "sync\n\nWrite all buffered filesystem blocks to disk.\n");
-    }
-    exit( sync());
+       if (argc > 1 && **(argv + 1) == '-')
+               show_usage();
+       sync();
+       return(EXIT_SUCCESS);
 }
-