* 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
|| (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;
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);
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
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;
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
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;
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;
}
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
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);
}
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);
}