1303 files changed, 32187 insertions, 57138 deletions
diff --git a/coreutils/sync.c b/coreutils/sync.c index 7d98a1e..1a5aae5 100644 --- a/coreutils/sync.c +++ b/coreutils/sync.c @@ -3,16 +3,40 @@ * Mini sync implementation for busybox * * Copyright (C) 1995, 1996 by Bruce Perens <bruce@pixar.com>. + * Copyright (C) 2015 by Ari Sundholm <ari@tuxera.com> * * Licensed under GPLv2 or later, see file LICENSE in this source tree. */ +//config:config SYNC +//config: bool "sync" +//config: default y +//config: help +//config: sync is used to flush filesystem buffers. +//config:config FEATURE_SYNC_FANCY +//config: bool "Enable -d and -f flags (requires syncfs(2) in libc)" +//config: default y +//config: depends on SYNC +//config: help +//config: sync -d FILE... executes fdatasync() on each FILE. +//config: sync -f FILE... executes syncfs() on each FILE. + +//applet:IF_SYNC(APPLET_NOFORK(sync, sync, BB_DIR_BIN, BB_SUID_DROP, sync)) + +//kbuild:lib-$(CONFIG_SYNC) += sync.o /* BB_AUDIT SUSv3 N/A -- Matches GNU behavior. */ //usage:#define sync_trivial_usage -//usage: "" +//usage: ""IF_FEATURE_SYNC_FANCY("[-df] [FILE]...") //usage:#define sync_full_usage "\n\n" +//usage: IF_NOT_FEATURE_SYNC_FANCY( //usage: "Write all buffered blocks to disk" +//usage: ) +//usage: IF_FEATURE_SYNC_FANCY( +//usage: "Write all buffered blocks (in FILEs) to disk" +//usage: "\n -d Avoid syncing metadata" +//usage: "\n -f Sync filesystems underlying FILEs" +//usage: ) #include "libbb.h" |