X-Git-Url: https://mattmccutchen.net/rsync/rsync-patches.git/blobdiff_plain/963ca80882dea2131e78563fa59e3e0e7c70c195..041359b073df4fe698ec80f2e0699a2585b2337b:/copy-devices.diff diff --git a/copy-devices.diff b/copy-devices.diff index 67b6168..45a237c 100644 --- a/copy-devices.diff +++ b/copy-devices.diff @@ -4,10 +4,10 @@ the data inside a device instead of duplicating the device node. To use this patch, run these commands for a successful build: patch -p1 ndx_start; @@ -89,12 +89,12 @@ diff --git a/rsync.c b/rsync.c diff --git a/sender.c b/sender.c --- a/sender.c +++ b/sender.c -@@ -309,6 +309,20 @@ void send_files(int f_in, int f_out) +@@ -336,6 +336,20 @@ void send_files(int f_in, int f_out) exit_cleanup(RERR_PROTOCOL); } -+ /* On Linux systems (at least), st_size is typically 0 for devices. -+ * If so, try to determine the actual device size. */ ++ /* On Matt's computer, st_size is falsely 0 for most devices. ++ * If this happens, try harder to determine the actual device size. */ + if (IS_DEVICE(st.st_mode) && st.st_size == 0) { + OFF_T off = lseek(fd, 0, SEEK_END); + if (off == (OFF_T) -1)