The patches for 3.0.5pre1.
[rsync/rsync-patches.git] / copy-devices.diff
index 7be9f6c..67b6168 100644 (file)
@@ -55,7 +55,7 @@ diff --git a/options.c b/options.c
    {"specials",         0,  POPT_ARG_VAL,    &preserve_specials, 1, 0, 0 },
    {"no-specials",      0,  POPT_ARG_VAL,    &preserve_specials, 0, 0, 0 },
    {"links",           'l', POPT_ARG_VAL,    &preserve_links, 1, 0, 0 },
-@@ -2061,6 +2064,9 @@ void server_options(char **args, int *argc_p)
+@@ -2062,6 +2065,9 @@ void server_options(char **args, int *argc_p)
        else if (remove_source_files)
                args[ac++] = "--remove-sent-files";
  
@@ -76,7 +76,7 @@ diff --git a/rsync.c b/rsync.c
  extern int am_root;
  extern int am_server;
  extern int am_sender;
-@@ -326,7 +327,8 @@ int read_ndx_and_attrs(int f_in, int *iflag_ptr, uchar *type_ptr,
+@@ -329,7 +330,8 @@ int read_ndx_and_attrs(int f_in, int *iflag_ptr, uchar *type_ptr,
  
        if (iflags & ITEM_TRANSFER) {
                int i = ndx - cur_flist->ndx_start;
@@ -93,8 +93,8 @@ diff --git a/sender.c b/sender.c
                        exit_cleanup(RERR_PROTOCOL);
                }
  
-+              /* On Matt's computer, st_size is falsely 0 for most devices.
-+               * If this happens, try harder to determine the actual device size. */
++              /* On Linux systems (at least), st_size is typically 0 for devices.
++               * If so, try 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)