aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2019-03-29 17:38:53 -0700
committerandroid-build-merger <android-build-merger@google.com>2019-03-29 17:38:53 -0700
commitf3fc3c1b51d0610350817c166bc5092cd3a1e56c (patch)
treef4359d2488477890ab594acbce3373b892063ea5
parent427333360c7af225cc1c2cb15cb846bc5eaf6236 (diff)
parenta7011fcad8cc9c19d4c37b6a4cf61033aeafcb7d (diff)
downloadandroid_external_toybox-f3fc3c1b51d0610350817c166bc5092cd3a1e56c.tar.gz
android_external_toybox-f3fc3c1b51d0610350817c166bc5092cd3a1e56c.tar.bz2
android_external_toybox-f3fc3c1b51d0610350817c166bc5092cd3a1e56c.zip
Merge "Add fsync."
am: a7011fcad8 Change-Id: If9b874a988d1192507650876b4078244662ed7bc
-rw-r--r--.config2
-rw-r--r--Android.bp2
-rw-r--r--generated/config.h4
-rw-r--r--generated/flags.h4
4 files changed, 7 insertions, 5 deletions
diff --git a/.config b/.config
index e86da372..eb82ddec 100644
--- a/.config
+++ b/.config
@@ -121,7 +121,7 @@ CONFIG_FREE=y
# CONFIG_FSCK is not set
CONFIG_FSFREEZE=y
# CONFIG_FSTYPE is not set
-# CONFIG_FSYNC is not set
+CONFIG_FSYNC=y
# CONFIG_FTPGET is not set
# CONFIG_FTPPUT is not set
CONFIG_GETCONF=y
diff --git a/Android.bp b/Android.bp
index 722fc18a..91da3ad3 100644
--- a/Android.bp
+++ b/Android.bp
@@ -107,6 +107,7 @@ cc_defaults {
"toys/other/free.c",
"toys/other/freeramdisk.c",
"toys/other/fsfreeze.c",
+ "toys/other/fsync.c",
"toys/other/help.c",
"toys/other/hwclock.c",
"toys/other/i2ctools.c",
@@ -299,6 +300,7 @@ cc_defaults {
"flock",
"fmt",
"free",
+ "fsync",
"getconf",
"getenforce",
"groups",
diff --git a/generated/config.h b/generated/config.h
index eccfc954..d018081a 100644
--- a/generated/config.h
+++ b/generated/config.h
@@ -216,8 +216,8 @@
#define USE_FSFREEZE(...) __VA_ARGS__
#define CFG_FSTYPE 0
#define USE_FSTYPE(...)
-#define CFG_FSYNC 0
-#define USE_FSYNC(...)
+#define CFG_FSYNC 1
+#define USE_FSYNC(...) __VA_ARGS__
#define CFG_FTPGET 0
#define USE_FTPGET(...)
#define CFG_FTPPUT 0
diff --git a/generated/flags.h b/generated/flags.h
index 3be9e367..0e74cc9e 100644
--- a/generated/flags.h
+++ b/generated/flags.h
@@ -934,7 +934,7 @@
#undef FOR_fstype
#endif
-// fsync <1d
+// fsync <1d <1d
#undef OPTSTR_fsync
#define OPTSTR_fsync "<1d"
#ifdef CLEANUP_fsync
@@ -4131,7 +4131,7 @@
#ifndef TT
#define TT this.fsync
#endif
-#define FLAG_d (FORCED_FLAG<<0)
+#define FLAG_d (1<<0)
#endif
#ifdef FOR_ftpget