diff options
author | Wayne Davison <wayne@opencoder.net> | 2021-09-27 10:30:00 -0700 |
---|---|---|
committer | Wayne Davison <wayne@opencoder.net> | 2021-09-27 10:30:00 -0700 |
commit | 82f023d7e3cca126d264ebb81b19feaf8731ad9a (patch) | |
tree | 82316449c2e1e816f9ff3a1181f60ef1c524c751 /options.c | |
parent | ec57c57baf848718bbab93fa0c597d15718acc5a (diff) | |
download | rsync-82f023d7e3cca126d264ebb81b19feaf8731ad9a.tar.gz |
Add --fsync option (promoted from patches).
Diffstat (limited to 'options.c')
-rw-r--r-- | options.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -66,6 +66,7 @@ int open_noatime = 0; int cvs_exclude = 0; int dry_run = 0; int do_xfers = 1; +int do_fsync = 0; int ignore_times = 0; int delete_mode = 0; int delete_during = 0; @@ -789,6 +790,7 @@ static struct poptOption long_options[] = { {"no-timeout", 0, POPT_ARG_VAL, &io_timeout, 0, 0, 0 }, {"contimeout", 0, POPT_ARG_INT, &connect_timeout, 0, 0, 0 }, {"no-contimeout", 0, POPT_ARG_VAL, &connect_timeout, 0, 0, 0 }, + {"fsync", 0, POPT_ARG_NONE, &do_fsync, 0, 0, 0 }, {"stop-after", 0, POPT_ARG_STRING, 0, OPT_STOP_AFTER, 0, 0 }, {"time-limit", 0, POPT_ARG_STRING, 0, OPT_STOP_AFTER, 0, 0 }, /* earlier stop-after name */ {"stop-at", 0, POPT_ARG_STRING, 0, OPT_STOP_AT, 0, 0 }, @@ -2806,6 +2808,9 @@ void server_options(char **args, int *argc_p) args[ac++] = tmpdir; } + if (do_fsync) + args[ac++] = "--fsync"; + if (basis_dir[0]) { /* the server only needs this option if it is not the sender, * and it may be an older version that doesn't know this |