blob: f00a3d0759eceff5b3119e72c00a6ae0380a7a39 [file] [log] [blame]
Erik Andersene49d5ec2000-02-08 19:58:47 +00001/* vi: set sw=4 ts=4: */
Eric Andersenc4996011999-10-20 22:08:37 +00002/*
3 * Mini sync implementation for busybox
4 *
Eric Andersenc4996011999-10-20 22:08:37 +00005 * Copyright (C) 1995, 1996 by Bruce Perens <bruce@pixar.com>.
6 *
"Robert P. J. Day"801ab142006-07-12 07:56:04 +00007 * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
Eric Andersenc4996011999-10-20 22:08:37 +00008 */
9
Manuel Novoa III cad53642003-03-19 09:13:01 +000010/* BB_AUDIT SUSv3 N/A -- Matches GNU behavior. */
11
Denis Vlasenkob6adbf12007-05-26 19:00:18 +000012#include "libbb.h"
Eric Andersencc8ed391999-10-05 16:24:54 +000013
Denis Vlasenko99912ca2007-04-10 15:43:37 +000014/* This is a NOFORK applet. Be very careful! */
15
Denis Vlasenko9b49a5e2007-10-11 10:05:36 +000016int sync_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
Denis Vlasenkoa60f84e2008-07-05 09:18:54 +000017int sync_main(int argc, char **argv UNUSED_PARAM)
Eric Andersencc8ed391999-10-05 16:24:54 +000018{
Denis Vlasenko68404f12008-03-17 09:00:54 +000019 /* coreutils-6.9 compat */
Manuel Novoa III cad53642003-03-19 09:13:01 +000020 bb_warn_ignoring_args(argc - 1);
21
Glenn L McGratha9c69762001-02-16 10:21:35 +000022 sync();
Manuel Novoa III cad53642003-03-19 09:13:01 +000023
Denis Vlasenko079f8af2006-11-27 16:49:31 +000024 return EXIT_SUCCESS;
Eric Andersencc8ed391999-10-05 16:24:54 +000025}