[BACK]Return to flist.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / rsync

Diff for /src/usr.bin/rsync/flist.c between version 1.2 and 1.3

version 1.2, 2019/02/10 23:24:14 version 1.3, 2019/02/10 23:56:19
Line 102 
Line 102 
                         new[j++] = *f;                          new[j++] = *f;
                         i++;                          i++;
                         WARNX(sess, "%s: duplicate path: %s",                          WARNX(sess, "%s: duplicate path: %s",
                                 f->wpath, f->path);                              f->wpath, f->path);
                         free(fnext->path);                          free(fnext->path);
                         free(fnext->link);                          free(fnext->link);
                         fnext->path = fnext->link = NULL;                          fnext->path = fnext->link = NULL;
Line 110 
Line 110 
                 }                  }
   
                 ERRX(sess, "%s: duplicate working path for "                  ERRX(sess, "%s: duplicate working path for "
                         "possibly different file: %s, %s",                      "possibly different file: %s, %s",
                         f->wpath, f->path, fnext->path);                      f->wpath, f->path, fnext->path);
                 free(new);                  free(new);
                 return 0;                  return 0;
         }          }
Line 208 
Line 208 
 static void  static void
 flist_copy_stat(struct flist *f, const struct stat *st)  flist_copy_stat(struct flist *f, const struct stat *st)
 {  {
   
         f->st.mode = st->st_mode;          f->st.mode = st->st_mode;
         f->st.uid = st->st_uid;          f->st.uid = st->st_uid;
         f->st.gid = st->st_gid;          f->st.gid = st->st_gid;
Line 238 
Line 237 
  * Return zero on failure, non-zero on success.   * Return zero on failure, non-zero on success.
  */   */
 int  int
 flist_send(struct sess *sess, int fdin,  flist_send(struct sess *sess, int fdin, int fdout, const struct flist *fl,
         int fdout, const struct flist *fl, size_t flsz)      size_t flsz)
 {  {
         size_t           i, fnlen;          size_t           i, fnlen;
         uint8_t          flag;          uint8_t          flag;
Line 344 
Line 343 
  * Returns zero on failure, non-zero on success.   * Returns zero on failure, non-zero on success.
  */   */
 static int  static int
 flist_recv_name(struct sess *sess, int fd,  flist_recv_name(struct sess *sess, int fd, struct flist *f, uint8_t flags,
         struct flist *f, uint8_t flags, char last[MAXPATHLEN])      char last[MAXPATHLEN])
 {  {
         uint8_t          bval;          uint8_t          bval;
         size_t           partial = 0;          size_t           partial = 0;
Line 432 
Line 431 
  * Returns zero on failure, non-zero on success.   * Returns zero on failure, non-zero on success.
  */   */
 static int  static int
 flist_realloc(struct sess *sess,  flist_realloc(struct sess *sess, struct flist **fl, size_t *sz, size_t *max)
         struct flist **fl, size_t *sz, size_t *max)  
 {  {
         void    *pp;          void    *pp;
   
Line 460 
Line 458 
  * Returns zero on failure, non-zero on success.   * Returns zero on failure, non-zero on success.
  */   */
 static int  static int
 flist_append(struct sess *sess, struct flist *f,  flist_append(struct sess *sess, struct flist *f, struct stat *st,
         struct stat *st, const char *path)      const char *path)
 {  {
   
         /*          /*
Line 630 
Line 628 
  * Returns zero on failure, non-zero on success.   * Returns zero on failure, non-zero on success.
  */   */
 static int  static int
 flist_gen_dirent(struct sess *sess, char *root,  flist_gen_dirent(struct sess *sess, char *root, struct flist **fl, size_t *sz,
         struct flist **fl, size_t *sz, size_t *max)      size_t *max)
 {  {
         char            *cargv[2], *cp;          char            *cargv[2], *cp;
         int              rc = 0;          int              rc = 0;
Line 805 
Line 803 
  * Returns zero on failure, non-zero on success.   * Returns zero on failure, non-zero on success.
  */   */
 static int  static int
 flist_gen_dirs(struct sess *sess, size_t argc,  flist_gen_dirs(struct sess *sess, size_t argc, char **argv, struct flist **flp,
         char **argv, struct flist **flp, size_t *sz)      size_t *sz)
 {  {
         size_t           i, max = 0;          size_t           i, max = 0;
   
Line 833 
Line 831 
  * Returns zero on failure, non-zero on success.   * Returns zero on failure, non-zero on success.
  */   */
 static int  static int
 flist_gen_files(struct sess *sess, size_t argc,  flist_gen_files(struct sess *sess, size_t argc, char **argv,
         char **argv, struct flist **flp, size_t *sz)      struct flist **flp, size_t *sz)
 {  {
         struct flist    *fl = NULL, *f;          struct flist    *fl = NULL, *f;
         size_t           i, flsz = 0;          size_t           i, flsz = 0;
Line 876 
Line 874 
                         continue;                          continue;
                 }                  }
   
   
                 f = &fl[flsz++];                  f = &fl[flsz++];
                 assert(NULL != f);                  assert(NULL != f);
   
Line 910 
Line 909 
  * On success, "fl" will need to be freed with flist_free().   * On success, "fl" will need to be freed with flist_free().
  */   */
 int  int
 flist_gen(struct sess *sess, size_t argc,  flist_gen(struct sess *sess, size_t argc, char **argv, struct flist **flp,
         char **argv, struct flist **flp, size_t *sz)      size_t *sz)
 {  {
         int      rc;          int      rc;
   
Line 951 
Line 950 
  * On success, "fl" will need to be freed with flist_free().   * On success, "fl" will need to be freed with flist_free().
  */   */
 int  int
 flist_gen_dels(struct sess *sess, const char *root,  flist_gen_dels(struct sess *sess, const char *root, struct flist **fl,
         struct flist **fl, size_t *sz,      size_t *sz, const struct flist *wfl, size_t wflsz)
         const struct flist *wfl, size_t wflsz)  
 {  {
         char            **cargv = NULL;          char            **cargv = NULL;
         int               rc = 0, c;          int               rc = 0, c;
Line 1131 
Line 1129 
  * Return zero on failure, non-zero on success.   * Return zero on failure, non-zero on success.
  */   */
 int  int
 flist_del(struct sess *sess, int root,  flist_del(struct sess *sess, int root, const struct flist *fl, size_t flsz)
         const struct flist *fl, size_t flsz)  
 {  {
         ssize_t  i;          ssize_t  i;
         int      flag;          int      flag;

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3