I noticed that when doing rsync, sometimes the sizes reported seemed
outrageously large. It turned out that rsync was trying to add the st_size
field for non-regular files. Often this field is -1 (at least for device
files). Here's the patch:
*** patch starts ***
*** flist.c@@/main/original/1 Tue Apr 9 14:02:48 2002
--- flist.c Tue Jun 18 09:40:46 2002
***************
*** 748,754 ****
file->basedir = NULL;
}
! if (!S_ISDIR(st.st_mode))
stats.total_size += st.st_size;
return file;
--- 749,755 ----
file->basedir = NULL;
}
! if (S_ISREG(st.st_mode))
stats.total_size += st.st_size;
return file;
--
To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html