rprintf(FERROR,
"%s with --inplace requires protocol 29 or higher"
" (negotiated %d).\n",
- alt_dest_name(0), protocol_version);
+ alt_dest_opt(0), protocol_version);
exit_cleanup(RERR_PROTOCOL);
}
rprintf(FERROR,
"Using more than one %s option requires protocol"
" 29 or higher (negotiated %d).\n",
- alt_dest_name(0), protocol_version);
+ alt_dest_opt(0), protocol_version);
exit_cleanup(RERR_PROTOCOL);
}
basis_dir[j] = bdir = new;
}
if (do_stat(bdir, &st) < 0)
- rprintf(FWARNING, "%s arg does not exist: %s\n", alt_dest_name(0), bdir);
+ rprintf(FWARNING, "%s arg does not exist: %s\n", alt_dest_opt(0), bdir);
else if (!S_ISDIR(st.st_mode))
- rprintf(FWARNING, "%s arg is not a dir: %s\n", alt_dest_name(0), bdir);
+ rprintf(FWARNING, "%s arg is not a dir: %s\n", alt_dest_opt(0), bdir);
}
}
poptAddAlias(con, unalias, 0);
}
-char *alt_dest_name(int type)
+char *alt_dest_opt(int type)
{
if (!type)
type = alt_dest_type;
if (alt_dest_type && alt_dest_type != want_dest_type) {
snprintf(err_buf, sizeof err_buf,
"ERROR: the %s option conflicts with the %s option\n",
- alt_dest_name(want_dest_type), alt_dest_name(0));
+ alt_dest_opt(want_dest_type), alt_dest_opt(0));
return 0;
}
alt_dest_type = want_dest_type;
if (basis_dir_cnt >= MAX_BASIS_DIRS) {
snprintf(err_buf, sizeof err_buf,
"ERROR: at most %d %s args may be specified\n",
- MAX_BASIS_DIRS, alt_dest_name(0));
+ MAX_BASIS_DIRS, alt_dest_opt(0));
return 0;
}
/* We defer sanitizing this arg until we know what
* option, so don't send it if client is the sender.
*/
for (i = 0; i < basis_dir_cnt; i++) {
- args[ac++] = alt_dest_name(0);
+ args[ac++] = alt_dest_opt(0);
args[ac++] = basis_dir[i];
}
}