MCPcopy Create free account
hub / github.com/RsyncProject/rsync / print_child_argv

Function print_child_argv

util1.c:98–117  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

96}
97
98void print_child_argv(const char *prefix, char **cmd)
99{
100 int cnt = 0;
101 rprintf(FCLIENT, "%s ", prefix);
102 for (; *cmd; cmd++) {
103 /* Look for characters that ought to be quoted. This
104 * is not a great quoting algorithm, but it's
105 * sufficient for a log message. */
106 if (strspn(*cmd, "abcdefghijklmnopqrstuvwxyz"
107 "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
108 "0123456789"
109 ",.-_=+@/") != strlen(*cmd)) {
110 rprintf(FCLIENT, "\"%s\" ", *cmd);
111 } else {
112 rprintf(FCLIENT, "%s ", *cmd);
113 }
114 cnt++;
115 }
116 rprintf(FCLIENT, " (%d args)\n", cnt);
117}
118
119/* This returns 0 for success, 1 for a symlink if symlink time-setting
120 * is not possible, or -1 for any other error. */

Callers 3

piped_childFunction · 0.85
send_protected_argsFunction · 0.85
start_inband_exchangeFunction · 0.85

Calls 1

rprintfFunction · 0.70

Tested by

no test coverage detected