Diff for /embedaddon/rsync/cleanup.c between versions 1.1.1.2 and 1.1.1.3

version 1.1.1.2, 2013/10/14 07:51:14 version 1.1.1.3, 2016/11/01 09:54:32
Line 4 Line 4
  * Copyright (C) 1996-2000 Andrew Tridgell   * Copyright (C) 1996-2000 Andrew Tridgell
  * Copyright (C) 1996 Paul Mackerras   * Copyright (C) 1996 Paul Mackerras
  * Copyright (C) 2002 Martin Pool   * Copyright (C) 2002 Martin Pool
 * Copyright (C) 2003-2013 Wayne Davison * Copyright (C) 2003-2015 Wayne Davison
  *   *
  * This program is free software; you can redistribute it and/or modify   * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by   * it under the terms of the GNU General Public License as published by
Line 22 Line 22
   
 #include "rsync.h"  #include "rsync.h"
   
   extern int dry_run;
 extern int am_server;  extern int am_server;
 extern int am_daemon;  extern int am_daemon;
 extern int am_receiver;  extern int am_receiver;
Line 156  NORETURN void _exit_cleanup(int code, const char *file Line 157  NORETURN void _exit_cleanup(int code, const char *file
                 switch_step++;                  switch_step++;
   
                 if (cleanup_got_literal && (cleanup_fname || cleanup_fd_w != -1)) {                  if (cleanup_got_literal && (cleanup_fname || cleanup_fd_w != -1)) {
                         const char *fname = cleanup_fname;  
                         cleanup_fname = NULL;  
                         if (cleanup_fd_r != -1) {                          if (cleanup_fd_r != -1) {
                                 close(cleanup_fd_r);                                  close(cleanup_fd_r);
                                 cleanup_fd_r = -1;                                  cleanup_fd_r = -1;
Line 167  NORETURN void _exit_cleanup(int code, const char *file Line 166  NORETURN void _exit_cleanup(int code, const char *file
                                 close(cleanup_fd_w);                                  close(cleanup_fd_w);
                                 cleanup_fd_w = -1;                                  cleanup_fd_w = -1;
                         }                          }
                        if (fname && cleanup_new_fname && keep_partial                        if (cleanup_fname && cleanup_new_fname && keep_partial
                          && handle_partial_dir(cleanup_new_fname, PDIR_CREATE)) {                           && handle_partial_dir(cleanup_new_fname, PDIR_CREATE)) {
                                 int tweak_modtime = 0;                                  int tweak_modtime = 0;
                                   const char *fname = cleanup_fname;
                                   cleanup_fname = NULL;
                                 if (!partial_dir) {                                  if (!partial_dir) {
                                     /* We don't want to leave a partial file with a modern time or it                                      /* We don't want to leave a partial file with a modern time or it
                                      * could be skipped via --update.  Setting the time to something                                       * could be skipped via --update.  Setting the time to something
Line 232  NORETURN void _exit_cleanup(int code, const char *file Line 233  NORETURN void _exit_cleanup(int code, const char *file
                 if (DEBUG_GTE(EXIT, 1)) {                  if (DEBUG_GTE(EXIT, 1)) {
                         rprintf(FINFO,                          rprintf(FINFO,
                                 "[%s] _exit_cleanup(code=%d, file=%s, line=%d): "                                  "[%s] _exit_cleanup(code=%d, file=%s, line=%d): "
                                "about to call exit(%d)\n",                                "about to call exit(%d)%s\n",
                                who_am_i(), first_code, exit_file, exit_line, exit_code);                                who_am_i(), first_code, exit_file, exit_line, exit_code,
                                 dry_run ? " (DRY RUN)" : "");
                 }                  }
   
                 /* FALLTHROUGH */                  /* FALLTHROUGH */

Removed from v.1.1.1.2  
changed lines
  Added in v.1.1.1.3


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>