From: Wayne Davison Date: Thu, 11 Nov 2004 01:16:31 +0000 (+0000) Subject: Fixed the option-parsing when no qualifying multiplier is specified X-Git-Url: https://mattmccutchen.net/rsync/rsync-patches.git/commitdiff_plain/340342ca5cc52d52bacf86ca7a1e6549222248ca Fixed the option-parsing when no qualifying multiplier is specified (e.g. --max-size=283743874). --- diff --git a/max-size.diff b/max-size.diff index 9ae2abb..5f2da50 100644 --- a/max-size.diff +++ b/max-size.diff @@ -1,4 +1,4 @@ ---- orig/generator.c 2004-10-06 00:12:16 +--- orig/generator.c 2004-11-03 20:30:45 +++ generator.c 2004-07-03 20:20:46 @@ -41,6 +41,7 @@ extern int make_backups; extern int csum_length; @@ -8,7 +8,7 @@ extern int io_timeout; extern int protocol_version; extern int always_checksum; -@@ -339,6 +340,10 @@ static void recv_generator(char *fname, +@@ -340,6 +341,10 @@ static void recv_generator(char *fname, && verbose && f_out != -1) rprintf(FINFO, "%s/\n", safe_fname(fname)); return; @@ -20,7 +20,7 @@ if (preserve_links && S_ISLNK(file->mode)) { --- orig/options.c 2004-10-14 17:11:40 -+++ options.c 2004-08-13 18:26:04 ++++ options.c 2004-11-11 01:15:01 @@ -90,6 +90,7 @@ int delete_after = 0; int only_existing = 0; int opt_ignore_existing = 0; @@ -62,7 +62,7 @@ {"timeout", 0, POPT_ARG_INT, &io_timeout, OPT_TIMEOUT, 0, 0 }, {"temp-dir", 'T', POPT_ARG_STRING, &tmpdir, 0, 0, 0 }, {"compare-dest", 0, POPT_ARG_STRING, &compare_dest, 0, 0, 0 }, -@@ -667,6 +671,33 @@ int parse_arguments(int *argc, const cha +@@ -667,6 +671,34 @@ int parse_arguments(int *argc, const cha read_batch = 1; break; @@ -83,6 +83,7 @@ + max_size = atof(max_size_arg) * 1024*1024*1024; + break; + case '\0': ++ max_size = atof(max_size_arg); + break; + default: + rprintf(FERROR, @@ -96,7 +97,7 @@ case OPT_TIMEOUT: if (io_timeout && io_timeout < select_timeout) select_timeout = io_timeout; -@@ -1050,6 +1081,11 @@ void server_options(char **args,int *arg +@@ -1050,6 +1082,11 @@ void server_options(char **args,int *arg args[ac++] = arg; }