version 1.5, 2019/02/11 21:41:22 |
version 1.6, 2019/02/12 18:59:34 |
|
|
* information that affects subsequent transmissions. |
* information that affects subsequent transmissions. |
*/ |
*/ |
#define FLIST_MODE_SAME 0x0002 /* mode is repeat */ |
#define FLIST_MODE_SAME 0x0002 /* mode is repeat */ |
|
#define FLIST_GID_SAME 0x0010 /* gid is repeat */ |
#define FLIST_NAME_SAME 0x0020 /* name is repeat */ |
#define FLIST_NAME_SAME 0x0020 /* name is repeat */ |
#define FLIST_NAME_LONG 0x0040 /* name >255 bytes */ |
#define FLIST_NAME_LONG 0x0040 /* name >255 bytes */ |
#define FLIST_TIME_SAME 0x0080 /* time is repeat */ |
#define FLIST_TIME_SAME 0x0080 /* time is repeat */ |
|
|
return 0; |
return 0; |
} |
} |
|
|
/* Optional link information. */ |
/* Conditional part: gid. */ |
|
|
|
if (sess->opts->preserve_gids && |
|
! io_write_int(sess, fdout, f->st.gid)) { |
|
ERRX1(sess, "io_write_int"); |
|
return 0; |
|
} |
|
|
|
/* Conditional part: link. */ |
|
|
if (S_ISLNK(f->st.mode) && |
if (S_ISLNK(f->st.mode) && |
sess->opts->preserve_links) { |
sess->opts->preserve_links) { |
fn = f->link; |
fn = f->link; |
|
|
} else |
} else |
ff->st.mode = fflast->st.mode; |
ff->st.mode = fflast->st.mode; |
|
|
/* Optionally read the link information. */ |
/* Conditional part: gid. */ |
|
|
|
if (sess->opts->preserve_gids) { |
|
if ( ! (FLIST_GID_SAME & flag)) { |
|
if ( ! io_read_int(sess, fd, &ival)) { |
|
ERRX1(sess, "io_read_int"); |
|
goto out; |
|
} |
|
ff->st.gid = ival; |
|
} else if (NULL == fflast) { |
|
ERRX(sess, "same gid " |
|
"without last entry"); |
|
goto out; |
|
} else |
|
ff->st.gid = fflast->st.gid; |
|
} |
|
|
|
/* Conditional part: link. */ |
|
|
if (S_ISLNK(ff->st.mode) && |
if (S_ISLNK(ff->st.mode) && |
sess->opts->preserve_links) { |
sess->opts->preserve_links) { |