X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/427b6179b9c90e5aed4435f8405f4718ff32f90c..114bafe0d0f66927648215afbfa83fa6e1858ecf:/log.c diff --git a/log.c b/log.c index af097122..bc8c747a 100644 --- a/log.c +++ b/log.c @@ -453,10 +453,14 @@ static void log_formatted(enum logcode code, char *format, char *op, n = buf2; break; case 'G': - strlcat(fmt, "d", sizeof fmt); - snprintf(buf2, sizeof buf2, fmt, - (long)file->gid); - n = buf2; + if (file->gid == GID_NONE) + n = "DEFAULT"; + else { + strlcat(fmt, "ld", sizeof fmt); + snprintf(buf2, sizeof buf2, fmt, + (long)file->gid); + n = buf2; + } break; case 'p': strlcat(fmt, "ld", sizeof fmt); @@ -467,8 +471,8 @@ static void log_formatted(enum logcode code, char *format, char *op, case 'M': n = timestring(file->modtime); { - char *cp = strchr(n, ' '); - if (cp) + char *cp = n; + while ((cp = strchr(cp, ' ')) != NULL) *cp = '-'; } break; @@ -733,11 +737,11 @@ void log_exit(int code, const char *file, int line) /* VANISHED is not an error, only a warning */ if (code == RERR_VANISHED) { - rprintf(FINFO, "rsync warning: %s (code %d) at %s(%d)\n", - name, code, file, line); + rprintf(FINFO, "rsync warning: %s (code %d) at %s(%d) [%s]\n", + name, code, file, line, who_am_i()); } else { - rprintf(FERROR, "rsync error: %s (code %d) at %s(%d)\n", - name, code, file, line); + rprintf(FERROR, "rsync error: %s (code %d) at %s(%d) [%s]\n", + name, code, file, line, who_am_i()); } } }