int alt_dest_type = 0;
int basis_dir_cnt = 0;
+static int version_opt_cnt = 0;
static int remote_option_alloc = 0;
int remote_option_cnt = 0;
const char **remote_options = NULL;
istring("%d-bit timestamps", (int)(sizeof (time_t) * 8)),
istring("%d-bit long ints", (int)(sizeof (int64) * 8)),
+ "*"
+#ifndef HAVE_SIMD
+ "no "
+#endif
+ "SIMD",
+
+ "*"
+#ifndef HAVE_ASM
+ "no "
+#endif
+ "ASM",
+
#ifndef HAVE_SOCKETPAIR
"no "
#endif
#endif
"prealloc",
-#ifndef HAVE_SIMD
- "no "
-#endif
- "SIMD",
-
NULL
};
char *cap = capabilities[j];
int cap_len = cap ? strlen(cap) : 1000;
int need_comma = cap && capabilities[j+1] != NULL ? 1 : 0;
+ if (cap && *cap == '*') {
+ if (version_opt_cnt < 2)
+ continue;
+ cap++;
+ cap_len--;
+ }
if (line_len + 1 + cap_len + need_comma >= (int)sizeof line_buf) {
rprintf(f, " %s\n", line_buf);
line_len = 0;
switch (opt) {
case 'V':
- print_rsync_version(FINFO);
- exit_cleanup(0);
+ version_opt_cnt++;
+ break;
case OPT_SERVER:
if (!am_server) {
}
}
+ if (version_opt_cnt) {
+ print_rsync_version(FINFO);
+ exit_cleanup(0);
+ }
+
if (protect_args < 0) {
if (am_server)
protect_args = 0;