Matt McCutchen's Web Site
/
rsync
/
rsync.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Tweaking the license text a bit more.
[rsync/rsync.git]
/
flist.c
diff --git
a/flist.c
b/flist.c
index
7f165a9
..
e33cd58
100644
(file)
--- a/
flist.c
+++ b/
flist.c
@@
-7,8
+7,9
@@
* Copyright (C) 2002-2007 Wayne Davison
*
* This program is free software; you can redistribute it and/or modify
* Copyright (C) 2002-2007 Wayne Davison
*
* This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 3 as
- * published by the Free Software Foundation.
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
@@
-708,7
+709,7
@@
static struct file_struct *recv_file_entry(struct file_list *flist,
|| (preserve_specials && IS_SPECIAL(mode))) {
uint32 *devp = F_RDEV_P(first);
rdev = MAKEDEV(DEV_MAJOR(devp), DEV_MINOR(devp));
|| (preserve_specials && IS_SPECIAL(mode))) {
uint32 *devp = F_RDEV_P(first);
rdev = MAKEDEV(DEV_MAJOR(devp), DEV_MINOR(devp));
- extra_len +=
2
* EXTRA_LEN;
+ extra_len +=
DEV_EXTRA_CNT
* EXTRA_LEN;
}
if (preserve_links && S_ISLNK(mode))
linkname_len = strlen(F_SYMLINK(first)) + 1;
}
if (preserve_links && S_ISLNK(mode))
linkname_len = strlen(F_SYMLINK(first)) + 1;
@@
-779,7
+780,7
@@
static struct file_struct *recv_file_entry(struct file_list *flist,
rdev_minor = read_int(f);
rdev = MAKEDEV(rdev_major, rdev_minor);
}
rdev_minor = read_int(f);
rdev = MAKEDEV(rdev_major, rdev_minor);
}
- extra_len +=
2
* EXTRA_LEN;
+ extra_len +=
DEV_EXTRA_CNT
* EXTRA_LEN;
file_length = 0;
} else if (protocol_version < 28)
rdev = MAKEDEV(0, 0);
file_length = 0;
} else if (protocol_version < 28)
rdev = MAKEDEV(0, 0);
@@
-827,7
+828,7
@@
static struct file_struct *recv_file_entry(struct file_list *flist,
if (inc_recurse && S_ISDIR(mode)) {
if (one_file_system) {
/* Room to save the dir's device for -x */
if (inc_recurse && S_ISDIR(mode)) {
if (one_file_system) {
/* Room to save the dir's device for -x */
- extra_len +=
2
* EXTRA_LEN;
+ extra_len +=
DEV_EXTRA_CNT
* EXTRA_LEN;
}
pool = dir_flist->file_pool;
} else
}
pool = dir_flist->file_pool;
} else
@@
-945,7
+946,7
@@
static struct file_struct *recv_file_entry(struct file_list *flist,
if (always_checksum && (S_ISREG(mode) || protocol_version < 28)) {
if (S_ISREG(mode))
if (always_checksum && (S_ISREG(mode) || protocol_version < 28)) {
if (S_ISREG(mode))
- bp =
(char*)
F_SUM(file);
+ bp = F_SUM(file);
else {
/* Prior to 28, we get a useless set of nulls. */
bp = tmp_sum;
else {
/* Prior to 28, we get a useless set of nulls. */
bp = tmp_sum;
@@
-1093,7
+1094,7
@@
struct file_struct *make_file(const char *fname, struct file_list *flist,
if (flist->prev && S_ISDIR(st.st_mode)
&& flags & FLAG_DIVERT_DIRS) {
/* Room for parent/sibling/next-child info. */
if (flist->prev && S_ISDIR(st.st_mode)
&& flags & FLAG_DIVERT_DIRS) {
/* Room for parent/sibling/next-child info. */
- extra_len +=
3
* EXTRA_LEN;
+ extra_len +=
DIRNODE_EXTRA_CNT
* EXTRA_LEN;
dir_count++;
pool = dir_flist->file_pool;
} else
dir_count++;
pool = dir_flist->file_pool;
} else
@@
-1239,14
+1240,14
@@
void unmake_file(struct file_struct *file)
static struct file_struct *send_file_name(int f, struct file_list *flist,
char *fname, STRUCT_STAT *stp,
static struct file_struct *send_file_name(int f, struct file_list *flist,
char *fname, STRUCT_STAT *stp,
- int flags, int filter_
flags
)
+ int flags, int filter_
level
)
{
struct file_struct *file;
#if defined SUPPORT_ACLS || defined SUPPORT_XATTRS
statx sx;
#endif
{
struct file_struct *file;
#if defined SUPPORT_ACLS || defined SUPPORT_XATTRS
statx sx;
#endif
- file = make_file(fname, flist, stp, flags, filter_
flags
);
+ file = make_file(fname, flist, stp, flags, filter_
level
);
if (!file)
return NULL;
if (!file)
return NULL;
@@
-1393,7
+1394,7
@@
static void add_dirs_to_tree(int parent_ndx, struct file_list *from_flist,
int i;
int32 *dp = NULL;
int32 *parent_dp = parent_ndx < 0 ? NULL
int i;
int32 *dp = NULL;
int32 *parent_dp = parent_ndx < 0 ? NULL
- : F_DIRNODE_P(dir_flist->sorted[parent_ndx]);
+ : F_DIR
_
NODE_P(dir_flist->sorted[parent_ndx]);
flist_expand(dir_flist, dir_cnt);
dir_flist->sorted = dir_flist->files;
flist_expand(dir_flist, dir_cnt);
dir_flist->sorted = dir_flist->files;
@@
-1418,7
+1419,7
@@
static void add_dirs_to_tree(int parent_ndx, struct file_list *from_flist,
else
send_dir_ndx = dir_flist->used - 1;
else
send_dir_ndx = dir_flist->used - 1;
- dp = F_DIRNODE_P(file);
+ dp = F_DIR
_
NODE_P(file);
DIR_PARENT(dp) = parent_ndx;
DIR_FIRST_CHILD(dp) = -1;
}
DIR_PARENT(dp) = parent_ndx;
DIR_FIRST_CHILD(dp) = -1;
}
@@
-1440,7
+1441,7
@@
static void send_directory(int f, struct file_list *flist, char *fbuf, int len,
DIR *d;
int divert_dirs = (flags & FLAG_DIVERT_DIRS) != 0;
int start = flist->used;
DIR *d;
int divert_dirs = (flags & FLAG_DIVERT_DIRS) != 0;
int start = flist->used;
- int filter_
flags
= f == -2 ? SERVER_FILTERS : ALL_FILTERS;
+ int filter_
level
= f == -2 ? SERVER_FILTERS : ALL_FILTERS;
assert(flist != NULL);
assert(flist != NULL);
@@
-1469,7
+1470,7
@@
static void send_directory(int f, struct file_list *flist, char *fbuf, int len,
continue;
}
continue;
}
- send_file_name(f, flist, fbuf, NULL, flags, filter_
flags
);
+ send_file_name(f, flist, fbuf, NULL, flags, filter_
level
);
}
fbuf[len] = '\0';
}
fbuf[len] = '\0';
@@
-1541,7
+1542,7
@@
void send_extra_file_list(int f, int at_least)
flist->parent_ndx = dir_ndx;
send1extra(f, file, flist);
flist->parent_ndx = dir_ndx;
send1extra(f, file, flist);
- dp = F_DIRNODE_P(file);
+ dp = F_DIR
_
NODE_P(file);
/* If there are any duplicate directory names that follow, we
* send all the dirs together in one file-list. The dir_flist
/* If there are any duplicate directory names that follow, we
* send all the dirs together in one file-list. The dir_flist
@@
-1551,7
+1552,7
@@
void send_extra_file_list(int f, int at_least)
send_dir_ndx = dir_ndx;
file = dir_flist->sorted[dir_ndx];
send1extra(f, file, flist);
send_dir_ndx = dir_ndx;
file = dir_flist->sorted[dir_ndx];
send1extra(f, file, flist);
- dp = F_DIRNODE_P(file);
+ dp = F_DIR
_
NODE_P(file);
}
write_byte(f, 0);
}
write_byte(f, 0);
@@
-1594,7
+1595,7
@@
void send_extra_file_list(int f, int at_least)
}
send_dir_depth--;
file = dir_flist->sorted[send_dir_ndx];
}
send_dir_depth--;
file = dir_flist->sorted[send_dir_ndx];
- dp = F_DIRNODE_P(file);
+ dp = F_DIR
_
NODE_P(file);
}
send_dir_ndx = DIR_NEXT_SIBLING(dp);
}
}
send_dir_ndx = DIR_NEXT_SIBLING(dp);
}