MCPcopy Index your code
hub / github.com/RsyncProject/rsync / generate_files

Function generate_files

generator.c:2243–2455  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2241}
2242
2243void generate_files(int f_out, const char *local_name)
2244{
2245 int i, ndx, next_loopchk = 0;
2246 char fbuf[MAXPATHLEN];
2247 int itemizing;
2248 enum logcode code;
2249 int save_info_flist = info_levels[INFO_FLIST];
2250 int save_info_progress = info_levels[INFO_PROGRESS];
2251
2252 if (protocol_version >= 29) {
2253 itemizing = 1;
2254 maybe_ATTRS_REPORT = stdout_format_has_i ? 0 : ATTRS_REPORT;
2255 code = logfile_format_has_i ? FNONE : FLOG;
2256 } else if (am_daemon) {
2257 itemizing = logfile_format_has_i && do_xfers;
2258 maybe_ATTRS_REPORT = ATTRS_REPORT;
2259 code = itemizing || !do_xfers ? FCLIENT : FINFO;
2260 } else if (!am_server) {
2261 itemizing = stdout_format_has_i;
2262 maybe_ATTRS_REPORT = stdout_format_has_i ? 0 : ATTRS_REPORT;
2263 code = itemizing ? FNONE : FINFO;
2264 } else {
2265 itemizing = 0;
2266 maybe_ATTRS_REPORT = ATTRS_REPORT;
2267 code = FINFO;
2268 }
2269 solo_file = local_name;
2270 dir_tweaking = !(list_only || solo_file || dry_run);
2271 need_retouch_dir_times = preserve_mtimes && !omit_dir_times;
2272 loopchk_limit = allowed_lull ? allowed_lull * 5 : 200;
2273 symlink_timeset_failed_flags = ITEM_REPORT_TIME
2274 | (protocol_version >= 30 || !am_server ? ITEM_REPORT_TIMEFAIL : 0);
2275 implied_dirs_are_missing = relative_paths && !implied_dirs && protocol_version < 30;
2276
2277 if (DEBUG_GTE(GENR, 1))
2278 rprintf(FINFO, "generator starting pid=%d\n", (int)getpid());
2279
2280 if (delete_before && !solo_file && cur_flist->used > 0)
2281 do_delete_pass();
2282 if (delete_during == 2) {
2283 deldelay_size = BIGPATHBUFLEN * 4;
2284 deldelay_buf = new_array(char, deldelay_size);
2285 }
2286 info_levels[INFO_FLIST] = info_levels[INFO_PROGRESS] = 0;
2287
2288 if (append_mode > 0 || whole_file < 0)
2289 whole_file = 0;
2290 if (DEBUG_GTE(FLIST, 1)) {
2291 rprintf(FINFO, "delta-transmission %s\n",
2292 whole_file
2293 ? "disabled for local transfer or --whole-file"
2294 : "enabled");
2295 }
2296
2297 dflt_perms = (ACCESSPERMS & ~orig_umask);
2298
2299 do {
2300#ifdef SUPPORT_HARD_LINKS

Callers 1

do_recvFunction · 0.85

Calls 15

do_delete_passFunction · 0.85
wait_for_receiverFunction · 0.85
strlcpyFunction · 0.85
f_nameFunction · 0.85
recv_generatorFunction · 0.85
delete_in_dirFunction · 0.85
change_local_filter_dirFunction · 0.85
check_for_finished_filesFunction · 0.85
maybe_send_keepaliveFunction · 0.85
maybe_flush_socketFunction · 0.85
write_ndxFunction · 0.85
write_del_statsFunction · 0.85

Tested by

no test coverage detected