First draft of new "--sync" option.

This commit is contained in:
Andrew Wood
2023-07-26 22:17:00 +01:00
parent caf7d6ff18
commit 6cff3c1c2a
15 changed files with 123 additions and 52 deletions
+5 -1
View File
@@ -82,6 +82,7 @@ opts_t opts_parse(int argc, char **argv)
{"no-splice", 0, NULL, (int) 'C'},
{"skip-errors", 0, NULL, (int) 'E'},
{"stop-at-size", 0, NULL, (int) 'S'},
{"sync", 0, NULL, (int) 'Y'},
{"remote", 1, NULL, (int) 'R'},
{"pidfile", 1, NULL, (int) 'P'},
{"watchfd", 1, NULL, (int) 'd'},
@@ -91,7 +92,7 @@ opts_t opts_parse(int argc, char **argv)
int option_index = 0;
#endif
char *short_options =
"hVpteIrab8TA:fnqcWD:s:l0i:w:H:N:F:L:B:CESR:P:d:m:";
"hVpteIrab8TA:fnqcWD:s:l0i:w:H:N:F:L:B:CESYR:P:d:m:";
int c, numopts;
unsigned int check_pid;
int check_fd;
@@ -333,6 +334,9 @@ opts_t opts_parse(int argc, char **argv)
case 'S':
opts->stop_at_size = true;
break;
case 'Y':
opts->sync_after_write = true;
break;
case 'R':
opts->remote = pv_getnum_ui(optarg);
break;