summaryrefslogtreecommitdiff
path: root/fileio.c
diff options
context:
space:
mode:
authorDongHun Kwak <dh0128.kwak@samsung.com>2022-02-16 16:35:49 +0900
committerDongHun Kwak <dh0128.kwak@samsung.com>2022-02-16 16:35:49 +0900
commit0bc4568c4b69ef6535079bedda4a578f4e375aeb (patch)
tree3b6c2c08031225e8f6cc9032b4ee0ba78512538b /fileio.c
parent7acd85d65ef52b08be9cf5cdf057239aa7a21e85 (diff)
downloadrsync-0bc4568c4b69ef6535079bedda4a578f4e375aeb.tar.gz
rsync-0bc4568c4b69ef6535079bedda4a578f4e375aeb.tar.bz2
rsync-0bc4568c4b69ef6535079bedda4a578f4e375aeb.zip
Imported Upstream version 3.2.0upstream/3.2.0
Diffstat (limited to 'fileio.c')
-rw-r--r--fileio.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/fileio.c b/fileio.c
index b183e200..32dc62da 100644
--- a/fileio.c
+++ b/fileio.c
@@ -3,7 +3,7 @@
*
* Copyright (C) 1998 Andrew Tridgell
* Copyright (C) 2002 Martin Pool
- * Copyright (C) 2004-2018 Wayne Davison
+ * Copyright (C) 2004-2020 Wayne Davison
*
* 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
@@ -26,12 +26,12 @@
#define ENODATA EAGAIN
#endif
-/* We want all reads to be aligned on 1K boundries. */
-#define ALIGN_BOUNDRY 1024
+/* We want all reads to be aligned on 1K boundaries. */
+#define ALIGN_BOUNDARY 1024
/* How far past the boundary is an offset? */
-#define ALIGNED_OVERSHOOT(oft) ((oft) & (ALIGN_BOUNDRY-1))
+#define ALIGNED_OVERSHOOT(oft) ((oft) & (ALIGN_BOUNDARY-1))
/* Round up a length to the next boundary */
-#define ALIGNED_LENGTH(len) ((((len) - 1) | (ALIGN_BOUNDRY-1)) + 1)
+#define ALIGNED_LENGTH(len) ((((len) - 1) | (ALIGN_BOUNDARY-1)) + 1)
extern int sparse_files;
@@ -44,6 +44,8 @@ int sparse_end(int f, OFF_T size)
{
int ret;
+ sparse_past_write = 0;
+
if (!sparse_seek)
return 0;
@@ -322,7 +324,9 @@ int unmap_file(struct map_struct *map)
map->p = NULL;
}
ret = map->status;
- memset(map, 0, sizeof map[0]);
+#if 0 /* I don't think we really need this. */
+ force_memzero(map, sizeof map[0]);
+#endif
free(map);
return ret;