diff options
author | Wayne Davison <wayned@samba.org> | 2006-12-03 06:44:16 +0000 |
---|---|---|
committer | Wayne Davison <wayned@samba.org> | 2006-12-03 06:44:16 +0000 |
commit | 82ad07c4182f744c07b96a15df4572e559ed7dc8 (patch) | |
tree | 1f6dd4c5f7f72d77dde613a08c1d0e3a8905cc46 /log.c | |
parent | d144e43bb3ea77bdc9d1dd68a648166970822dd6 (diff) | |
download | rsync-82ad07c4182f744c07b96a15df4572e559ed7dc8.tar.gz rsync-82ad07c4182f744c07b96a15df4572e559ed7dc8.tar.bz2 rsync-82ad07c4182f744c07b96a15df4572e559ed7dc8.zip |
- Typical tranfers now save 12-20 bytes per file because several vars
were moved out of file_struct into an optional member-var setup.
- Renamed and reorganized the FLAG_* defines.
- Use NDX_DONE instead of a literal -1 when sending/checking the
end-of-phase index value.
Diffstat (limited to 'log.c')
-rw-r--r-- | log.c | 14 |
1 files changed, 9 insertions, 5 deletions
@@ -37,6 +37,10 @@ extern int msg_fd_out; extern int allow_8bit_chars; extern int protocol_version; extern int preserve_times; +extern int preserve_uid; +extern int preserve_gid; +extern int flist_extra_ndx; +extern int file_struct_len; extern int stdout_format_has_i; extern int stdout_format_has_o_or_i; extern int logfile_format_has_i; @@ -475,16 +479,16 @@ static void log_formatted(enum logcode code, const char *format, const char *op, case 'U': strlcat(fmt, "ld", sizeof fmt); snprintf(buf2, sizeof buf2, fmt, - (long)file->uid); + preserve_uid ? (long)F_UID(file) : 0); n = buf2; break; case 'G': - if (file->gid == GID_NONE) + if (!preserve_gid || F_GID(file) == GID_NONE) n = "DEFAULT"; else { strlcat(fmt, "ld", sizeof fmt); snprintf(buf2, sizeof buf2, fmt, - (long)file->gid); + (long)F_GID(file)); n = buf2; } break; @@ -544,8 +548,8 @@ static void log_formatted(enum logcode code, const char *format, const char *op, if (hlink && *hlink) { n = hlink; strlcpy(buf2, " => ", sizeof buf2); - } else if (S_ISLNK(file->mode) && file->u.link) { - n = file->u.link; + } else if (S_ISLNK(file->mode)) { + n = F_SYMLINK(file); strlcpy(buf2, " -> ", sizeof buf2); } else { n = ""; |