From 719522b9bd72266b2678849a0e306834dc15ae67 Mon Sep 17 00:00:00 2001 From: Wayne Davison Date: Sat, 21 Apr 2007 19:46:19 +0000 Subject: [PATCH] Tweaked --version in a few minor ways, including the mentioning of the SUBPROTOCOL_VERSION if it is non-zero. --- options.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/options.c b/options.c index 98c6e4d0..a269a511 100644 --- a/options.c +++ b/options.c @@ -198,6 +198,7 @@ char *bind_address; static void print_rsync_version(enum logcode f) { + char buf[32]; char const *got_socketpair = "no "; char const *have_inplace = "no "; char const *hardlinks = "no "; @@ -233,11 +234,16 @@ static void print_rsync_version(enum logcode f) ipv6 = ""; #endif - rprintf(f, "%s version %s protocol version %d\n", - RSYNC_NAME, RSYNC_VERSION, PROTOCOL_VERSION); + if (SUBPROTOCOL_VERSION) + snprintf(buf, sizeof buf, ".PR%d", SUBPROTOCOL_VERSION); + else + *buf = '\0'; + rprintf(f, "%s version %s protocol version %d%s\n", + RSYNC_NAME, RSYNC_VERSION, PROTOCOL_VERSION, buf); rprintf(f, "Copyright (C) 1996-2007 by Andrew Tridgell, Wayne Davison, and others.\n"); - rprintf(f, "\n"); - rprintf(f, "Capabilities: %d-bit files, %d-bit inums, %d-bit timestamps, %d-bit long ints,\n", + rprintf(f, "Web site: http://rsync.samba.org/\n"); + rprintf(f, "Capabilities:\n"); + rprintf(f, " %d-bit files, %d-bit inums, %d-bit timestamps, %d-bit long ints,\n", (int)(sizeof (OFF_T) * 8), (int)(sizeof dumstat->st_ino * 8), /* Don't check ino_t! */ (int)(sizeof (time_t) * 8), -- 2.34.1