X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/2855f61f4a0003d508b9e4cc1314f9bd52f2cf42..41bd28fee315c7b1d61c04dbe6441afba4d0b789:/options.c diff --git a/options.c b/options.c index c49f948d..35a6dc64 100644 --- a/options.c +++ b/options.c @@ -81,7 +81,7 @@ char *config_file = RSYNCD_CONF; char *shell_cmd = NULL; char *log_format = NULL; char *password_file = NULL; -char *rsync_path = RSYNC_NAME; +char *rsync_path = RSYNC_PATH; char *backup_dir = NULL; int rsync_port = RSYNC_PORT; @@ -125,7 +125,7 @@ static void print_rsync_version(int f) hardlinks, links); #ifdef NO_INT64 - rprintf(logcode, "WARNING: no 64-bit integers on this platform!\n"); + rprintf(f, "WARNING: no 64-bit integers on this platform!\n"); #endif } @@ -327,7 +327,7 @@ static int check_refuse_options(char *ref, int opt) while ((p = strstr(ref,name))) { if ((p==ref || p[-1]==' ') && (p[len] == ' ' || p[len] == 0)) { - slprintf(err_buf,sizeof(err_buf), + snprintf(err_buf,sizeof(err_buf), "The '%s' option is not supported by this server\n", name); return 1; } @@ -361,8 +361,7 @@ int parse_arguments(int *argc, const char ***argv, int frommain) /* The context leaks in case of an error, but if there's a * problem we always exit anyhow. */ - pc = poptGetContext(RSYNC_NAME, *argc, (const char **) *argv, - long_options, 0); + pc = poptGetContext(RSYNC_NAME, *argc, *argv, long_options, 0); while ((opt = poptGetNextOpt(pc)) != -1) { if (ref) { @@ -419,7 +418,7 @@ int parse_arguments(int *argc, const char ***argv, int frommain) * rprintf? Everybody who gets this message * ought to send it to the client and also to * the logs. */ - slprintf(err_buf,sizeof(err_buf), + snprintf(err_buf,sizeof(err_buf), "hard links are not supported on this %s\n", am_server ? "server" : "client"); rprintf(FERROR,"ERROR: hard links not supported on this platform\n"); @@ -472,7 +471,7 @@ int parse_arguments(int *argc, const char ***argv, int frommain) default: /* FIXME: If --daemon is specified, then errors for later * parameters seem to disappear. */ - slprintf(err_buf, sizeof(err_buf), + snprintf(err_buf, sizeof(err_buf), "%s%s: %s\n", am_server ? "on remote machine: " : "", poptBadOption(pc, POPT_BADOPTION_NOALIAS), @@ -569,22 +568,22 @@ void server_options(char **args,int *argc) if (x != 1) args[ac++] = argstr; if (block_size != BLOCK_SIZE) { - slprintf(bsize,sizeof(bsize),"-B%d",block_size); + snprintf(bsize,sizeof(bsize),"-B%d",block_size); args[ac++] = bsize; } if (max_delete && am_sender) { - slprintf(mdelete,sizeof(mdelete),"--max-delete=%d",max_delete); + snprintf(mdelete,sizeof(mdelete),"--max-delete=%d",max_delete); args[ac++] = mdelete; } if (io_timeout) { - slprintf(iotime,sizeof(iotime),"--timeout=%d",io_timeout); + snprintf(iotime,sizeof(iotime),"--timeout=%d",io_timeout); args[ac++] = iotime; } if (bwlimit) { - slprintf(bw,sizeof(bw),"--bwlimit=%d",bwlimit); + snprintf(bw,sizeof(bw),"--bwlimit=%d",bwlimit); args[ac++] = bw; } @@ -603,7 +602,7 @@ void server_options(char **args,int *argc) args[ac++] = "--size-only"; if (modify_window_set) { - slprintf(mwindow,sizeof(mwindow),"--modify-window=%d", + snprintf(mwindow,sizeof(mwindow),"--modify-window=%d", modify_window); args[ac++] = mwindow; }