blob: bb112ea38c277960bec171817e6624fb4fd4e4aa [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 *
Denys Vlasenko0ef64bd2010-08-16 20:14:46 +02007 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
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;
Denys Vlasenkobb16f572010-01-13 22:43:13 +010017int sync_main(int argc UNUSED_PARAM, char **argv IF_NOT_DESKTOP(UNUSED_PARAM))
Eric Andersencc8ed391999-10-05 16:24:54 +000018{
Denis Vlasenko68404f12008-03-17 09:00:54 +000019 /* coreutils-6.9 compat */
Denys Vlasenkoa355da02010-01-04 13:16:08 +010020 bb_warn_ignoring_args(argv[1]);
Manuel Novoa III cad53642003-03-19 09:13:01 +000021
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}