]> git.ipfire.org Git - thirdparty/rsync.git/commitdiff
Use RSYNC_GITVER in more output
authorWayne Davison <wayne@opencoder.net>
Mon, 3 Aug 2020 17:42:08 +0000 (10:42 -0700)
committerWayne Davison <wayne@opencoder.net>
Mon, 3 Aug 2020 17:46:31 +0000 (10:46 -0700)
clientserver.c
log.c
options.c

index 0f54dcabc8030d4af93ad8de5360cc4a1acc6fee..48c15a60130b20a05b19cbf76d7cae453952382c 100644 (file)
@@ -1451,7 +1451,7 @@ int daemon_main(void)
        log_init(0);
 
        rprintf(FLOG, "rsyncd version %s starting, listening on port %d\n",
-               RSYNC_VERSION, rsync_port);
+               rsync_version(), rsync_port);
        /* TODO: If listening on a particular address, then show that
         * address too.  In fact, why not just do getnameinfo on the
         * local address??? */
diff --git a/log.c b/log.c
index e641198c9fd1fd698f92cbf6d90cd8eb786ee6dc..062a930eb2f21ec055380df8a1a1a3e190586130 100644 (file)
--- a/log.c
+++ b/log.c
@@ -891,10 +891,10 @@ void log_exit(int code, const char *file, int line)
                /* VANISHED is not an error, only a warning */
                if (code == RERR_VANISHED) {
                        rprintf(FWARNING, "rsync warning: %s (code %d) at %s(%d) [%s=%s]\n",
-                               name, code, src_file(file), line, who_am_i(), RSYNC_VERSION);
+                               name, code, src_file(file), line, who_am_i(), rsync_version());
                } else {
                        rprintf(FERROR, "rsync error: %s (code %d) at %s(%d) [%s=%s]\n",
-                               name, code, src_file(file), line, who_am_i(), RSYNC_VERSION);
+                               name, code, src_file(file), line, who_am_i(), rsync_version());
                }
        }
 }
index 0e9f3db60eb074b17452999eb69e7bdb4da0a797..dc3dcee948defc7c0eebd050169fff8818069365 100644 (file)
--- a/options.c
+++ b/options.c
@@ -720,6 +720,11 @@ static void print_info_flags(enum logcode f)
        }
 }
 
+const char *rsync_version(void)
+{
+       return RSYNC_GITVER;
+}
+
 static void print_rsync_version(enum logcode f)
 {
        char tmpbuf[256], *subprotocol = "";
@@ -728,7 +733,7 @@ static void print_rsync_version(enum logcode f)
        subprotocol = istring(".PR%d", SUBPROTOCOL_VERSION);
 #endif
        rprintf(f, "%s  version %s  protocol version %d%s\n",
-               RSYNC_NAME, RSYNC_GITVER, PROTOCOL_VERSION, subprotocol);
+               RSYNC_NAME, rsync_version(), PROTOCOL_VERSION, subprotocol);
 
        rprintf(f, "Copyright (C) 1996-" LATEST_YEAR " by Andrew Tridgell, Wayne Davison, and others.\n");
        rprintf(f, "Web site: https://rsync.samba.org/\n");