Add errno.h
[oweals/busybox.git] / sync.c
diff --git a/sync.c b/sync.c
index cb4690c0238826f919ac587908217241febf9fd5..8f101cf17a219efbe10a4c980ac6d74dd3daf17c 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 "busybox.h"
 #include <stdio.h>
 
-extern int
-sync_main(int argc, char * * argv)
+extern int sync_main(int argc, char **argv)
 {
-    if ( argc>1 && **(argv+1) == '-' ) {
-       usage( "sync\nWrite all buffered filesystem blocks to disk.\n");
-    }
-    exit( sync());
+       if (argc > 1 && **(argv + 1) == '-')
+               usage(sync_usage);
+       return(sync());
 }
-