diff options
author | Wayne Davison <wayned@samba.org> | 2004-07-20 21:35:49 +0000 |
---|---|---|
committer | Wayne Davison <wayned@samba.org> | 2004-07-20 21:35:49 +0000 |
commit | b6609cafae8188e083ab2ff4aac3b40651278e8f (patch) | |
tree | ee2469d6dd080376ae6af3e33d27c48fcfa9b978 /cleanup.c | |
parent | efa95a184227e92bfde463483cc563e56aab5f09 (diff) | |
download | android_external_rsync-b6609cafae8188e083ab2ff4aac3b40651278e8f.tar.gz android_external_rsync-b6609cafae8188e083ab2ff4aac3b40651278e8f.tar.bz2 android_external_rsync-b6609cafae8188e083ab2ff4aac3b40651278e8f.zip |
- Got rid of cleanup_buf (map-file cleanup is not needed).
- Renamed the cleanup_fd* vars.
Diffstat (limited to 'cleanup.c')
-rw-r--r-- | cleanup.c | 20 |
1 files changed, 8 insertions, 12 deletions
@@ -73,8 +73,7 @@ int cleanup_got_literal = 0; static char *cleanup_fname; static char *cleanup_new_fname; static struct file_struct *cleanup_file; -static int cleanup_fd1, cleanup_fd2; -static struct map_struct *cleanup_buf; +static int cleanup_fd_r, cleanup_fd_w; static pid_t cleanup_pid = 0; pid_t cleanup_child_pid = -1; @@ -115,12 +114,10 @@ void _exit_cleanup(int code, const char *file, int line) if (cleanup_got_literal && cleanup_fname && keep_partial) { char *fname = cleanup_fname; cleanup_fname = NULL; - if (cleanup_buf) - unmap_file(cleanup_buf); - if (cleanup_fd1 != -1) - close(cleanup_fd1); - if (cleanup_fd2 != -1) - close(cleanup_fd2); + if (cleanup_fd_r != -1) + close(cleanup_fd_r); + if (cleanup_fd_w != -1) + close(cleanup_fd_w); finish_transfer(cleanup_new_fname, fname, cleanup_file, 0); } io_flush(FULL_FLUSH); @@ -161,14 +158,13 @@ void cleanup_disable(void) void cleanup_set(char *fnametmp, char *fname, struct file_struct *file, - struct map_struct *buf, int fd1, int fd2) + int fd_r, int fd_w) { cleanup_fname = fnametmp; cleanup_new_fname = fname; cleanup_file = file; - cleanup_buf = buf; - cleanup_fd1 = fd1; - cleanup_fd2 = fd2; + cleanup_fd_r = fd_r; + cleanup_fd_w = fd_w; } void cleanup_set_pid(pid_t pid) |