diff options
author | Wayne Davison <wayned@samba.org> | 2006-02-04 18:40:41 +0000 |
---|---|---|
committer | Wayne Davison <wayned@samba.org> | 2006-02-04 18:40:41 +0000 |
commit | 998113fedf200f94ee3e361deed00a9bd6e7d2a7 (patch) | |
tree | 9532bdde49a753b8196e1b7ce01bb3e430ea73af /log.c | |
parent | ee5544112a2ac420d7e8737f275a8f268071f351 (diff) | |
download | rsync-998113fedf200f94ee3e361deed00a9bd6e7d2a7.tar.gz rsync-998113fedf200f94ee3e361deed00a9bd6e7d2a7.tar.bz2 rsync-998113fedf200f94ee3e361deed00a9bd6e7d2a7.zip |
Needed to make %G output "DEFAULT" when gid == GID_NONE.
Diffstat (limited to 'log.c')
-rw-r--r-- | log.c | 16 |
1 files changed, 10 insertions, 6 deletions
@@ -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; - while ((cp = strchr(n, ' ')) != NULL) + char *cp = n; + while ((cp = strchr(cp, ' ')) != NULL) *cp = '-'; } break; |