extern int remove_source_files;
extern int stdout_format_has_i;
extern char *basis_dir[];
extern int remove_source_files;
extern int stdout_format_has_i;
extern char *basis_dir[];
- char *fname, int statret, STRUCT_STAT *st,
- char *toname, STRUCT_STAT *to_st,
+ const char *fname, int statret, STRUCT_STAT *stp,
+ const char *toname, STRUCT_STAT *to_stp,
- itemize(file, ndx, statret, st,
+ itemize(file, ndx, statret, stp,
- return hard_link_one(file, ndx, fname, statret, st, toname,
+ return hard_link_one(file, ndx, fname, statret, stp, toname,
-int hard_link_check(struct file_struct *file, int ndx, char *fname,
- int statret, STRUCT_STAT *st, int itemizing,
+int hard_link_check(struct file_struct *file, int ndx, const char *fname,
+ int statret, STRUCT_STAT *stp, int itemizing,
if (unchanged_attrs(file, &st3))
break;
} while (basis_dir[++j] != NULL);
}
if (unchanged_attrs(file, &st3))
break;
} while (basis_dir[++j] != NULL);
}
- maybe_hard_link(file, ndx, fname, statret, st,
+ maybe_hard_link(file, ndx, fname, statret, stp,
toname, &st2, itemizing, code);
toname, &st2, itemizing, code);
- if (remove_source_files == 1 && do_xfers) {
- char numbuf[4];
- SIVAL(numbuf, 0, ndx);
- send_msg(MSG_SUCCESS, numbuf, 4);
- }
+ if (remove_source_files == 1 && do_xfers)
+ send_msg_int(MSG_SUCCESS, ndx);
-#ifdef SUPPORT_HARD_LINKS
-int hard_link_one(struct file_struct *file, int ndx, char *fname,
- int statret, STRUCT_STAT *st, char *toname, int terse,
+int hard_link_one(struct file_struct *file, int ndx, const char *fname,
+ int statret, STRUCT_STAT *stp, const char *toname, int terse,
int itemizing, enum logcode code)
{
if (do_link(toname, fname)) {
int itemizing, enum logcode code)
{
if (do_link(toname, fname)) {
- itemize(file, ndx, statret, st,
+ itemize(file, ndx, statret, stp,
rprintf(code, "%s => %s\n", fname, toname);
return 0;
}
rprintf(code, "%s => %s\n", fname, toname);
return 0;
}
void hard_link_cluster(struct file_struct *file, int master, int itemizing,
enum logcode code, int dest_used)
{
void hard_link_cluster(struct file_struct *file, int master, int itemizing,
enum logcode code, int dest_used)
{
statret = link_stat(hlink2, &st2, 0);
maybe_hard_link(file, ndx, hlink2, statret, &st2,
hlink1, &st1, itemizing, code);
statret = link_stat(hlink2, &st2, 0);
maybe_hard_link(file, ndx, hlink2, statret, &st2,
hlink1, &st1, itemizing, code);
- if (remove_source_files == 1 && do_xfers) {
- char numbuf[4];
- SIVAL(numbuf, 0, ndx);
- send_msg(MSG_SUCCESS, numbuf, 4);
- }
+ if (remove_source_files == 1 && do_xfers)
+ send_msg_int(MSG_SUCCESS, ndx);