* archival/bunzip2.c (bunzip2_main): Do not remove files if writing to standard
[oweals/busybox.git] / coreutils / sync.c
index f8160c8dcb42e1fdbd1067a3668c95dadd5564d6..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\nWrite all buffered filesystem blocks to disk.\n");
-       }
-       exit(sync());
+       if (argc > 1 && **(argv + 1) == '-')
+               show_usage();
+       sync();
+       return(EXIT_SUCCESS);
 }