Lines Matching refs:fp
76 static errmask_t check_file(struct file *fp);
77 static diffmask_t check_changes(struct file *fp, int first, int second);
78 static int prune_file(struct file *fp);
79 static void queue_file(struct file *fp);
113 struct file *fp; in analyze() local
127 for (fp = bp->b_files; fp; fp = fp->f_next) in analyze()
128 if (fp->f_flags & F_EVALUATE) in analyze()
129 errs |= find_renames(fp); in analyze()
150 for (fp = bp->b_files; fp; fp = fp->f_next) in analyze()
151 if (fp->f_flags & (F_EVALUATE|F_STAT_ERROR)) in analyze()
152 errs |= check_file(fp); in analyze()
197 for (fp = changes; fp; fp = fp->f_rnext) in analyze()
198 if (aborted || (fp->f_flags & F_STAT_ERROR)) { in analyze()
199 fp->f_flags |= F_CONFLICT; in analyze()
201 if ((fp->f_flags & F_IN_BASELINE) == 0) in analyze()
202 fp->f_flags |= F_REMOVE; in analyze()
203 fp->f_problem = aborted ? PROB_aborted : PROB_restat; in analyze()
204 (fp->f_base)->b_unresolved++; in analyze()
210 fp->f_fullname); in analyze()
212 err = reconcile(fp); in analyze()
236 prune_file(struct file *fp) in prune_file() argument
241 if ((fp->f_flags & (F_EVALUATE|F_STAT_ERROR)) == 0) { in prune_file()
242 fp->f_flags |= F_REMOVE; in prune_file()
245 fprintf(stderr, "ANAL: PRUNE %s\n", fp->f_name); in prune_file()
249 for (cp = fp->f_files; cp; cp = cp->f_next) in prune_file()
269 struct file *fp; in prune() local
273 for (fp = bp->b_files; fp; fp = fp->f_next) in prune()
274 prunes += prune_file(fp); in prune()
293 struct file *fp; in summary() local
317 for (fp = changes; fp; fp = fp->f_rnext) { in summary()
318 if (fp->f_base != bp) in summary()
320 if ((fp->f_flags & F_CONFLICT) == 0) in summary()
322 fprintf(stderr, "\t\t%s (%s)\n", fp->f_fullname, in summary()
323 fp->f_problem ? fp->f_problem : "???"); in summary()
355 check_file(struct file *fp) in check_file() argument
359 if ((fp->f_flags & F_STAT_ERROR) == 0) { in check_file()
361 fp->f_info[OPT_BASE].f_modtime = fp->f_s_modtime; in check_file()
362 fp->f_info[OPT_BASE].f_ino = fp->f_s_inum; in check_file()
363 fp->f_info[OPT_BASE].f_d_maj = fp->f_s_maj; in check_file()
364 fp->f_info[OPT_BASE].f_d_min = fp->f_s_min; in check_file()
365 fp->f_info[OPT_BASE].f_nlink = fp->f_s_nlink; in check_file()
366 fp->f_srcdiffs |= check_changes(fp, OPT_BASE, OPT_SRC); in check_file()
369 fp->f_info[OPT_BASE].f_modtime = fp->f_d_modtime; in check_file()
370 fp->f_info[OPT_BASE].f_ino = fp->f_d_inum; in check_file()
371 fp->f_info[OPT_BASE].f_d_maj = fp->f_d_maj; in check_file()
372 fp->f_info[OPT_BASE].f_d_min = fp->f_d_min; in check_file()
373 fp->f_info[OPT_BASE].f_nlink = fp->f_d_nlink; in check_file()
374 fp->f_dstdiffs |= check_changes(fp, OPT_BASE, OPT_DST); in check_file()
377 if ((fp->f_flags & (F_IN_SOURCE|F_IN_DEST)) == 0) { in check_file()
378 fp->f_srcdiffs |= D_DELETE; in check_file()
379 fp->f_dstdiffs |= D_DELETE; in check_file()
383 if ((fp->f_dstdiffs | fp->f_srcdiffs) & D_DELETE) { in check_file()
387 if (fp->f_files) in check_file()
393 if (fp->f_srcdiffs || fp->f_dstdiffs || fp->f_flags & F_STAT_ERROR) { in check_file()
394 queue_file(fp); in check_file()
398 showflags(diffmap, fp->f_srcdiffs)); in check_file()
400 showflags(diffmap, fp->f_dstdiffs)); in check_file()
402 showflags(fileflags, fp->f_flags)); in check_file()
403 fprintf(stderr, " name=%s\n", fp->f_fullname); in check_file()
408 fp->f_base->b_totfiles++; in check_file()
412 if (fp->f_files == 0) in check_file()
427 push_name(fp->f_name); in check_file()
429 for (cp = fp->f_files; cp; cp = cp->f_next) { in check_file()
430 if (fp->f_flags & F_STAT_ERROR) in check_file()
461 check_changes(struct file *fp, int ref, int new) in check_changes() argument
466 rp = &fp->f_info[ref]; in check_changes()
467 np = &fp->f_info[new]; in check_changes()
648 find_link(struct file *fp, side_t srcdst) in find_link() argument
657 fcp = &fp->f_info[chgside]; in find_link()
658 ftp = &fp->f_info[tgtside]; in find_link()
685 if (fp == lp) in find_link()
727 if ((fp->f_base != lp->f_base) && same_name(fp, lp, chgside)) in find_link()
732 fp->f_fullname, lp->f_fullname); in find_link()
749 if (fp == lp) in find_link()
804 fp->f_fullname, lp->f_fullname); in find_link()
832 has_other_links(struct file *fp, side_t srcdst) in has_other_links() argument
836 fip = &fp->f_info[srcdst]; in has_other_links()
845 if (fp == lp) in has_other_links()
908 link_update(struct file *fp, side_t which) in link_update() argument
913 if (lp == fp) in link_update()
917 if (lp->f_info[which].f_ino != fp->f_info[which].f_ino) in link_update()
919 if (lp->f_info[which].f_d_maj != fp->f_info[which].f_d_maj) in link_update()
921 if (lp->f_info[which].f_d_min != fp->f_info[which].f_d_min) in link_update()
929 lp->f_info[which].f_type = fp->f_info[which].f_type; in link_update()
930 lp->f_info[which].f_size = fp->f_info[which].f_size; in link_update()
931 lp->f_info[which].f_mode = fp->f_info[which].f_mode; in link_update()
932 lp->f_info[which].f_uid = fp->f_info[which].f_uid; in link_update()
933 lp->f_info[which].f_gid = fp->f_info[which].f_gid; in link_update()
934 lp->f_info[which].f_modtime = fp->f_info[which].f_modtime; in link_update()
935 lp->f_info[which].f_modns = fp->f_info[which].f_modns; in link_update()
936 lp->f_info[which].f_nlink = fp->f_info[which].f_nlink; in link_update()
937 lp->f_info[which].f_rd_maj = fp->f_info[which].f_rd_maj; in link_update()
938 lp->f_info[which].f_rd_min = fp->f_info[which].f_rd_min; in link_update()
977 queue_file(struct file *fp) in queue_file() argument
986 if ((fp->f_srcdiffs|fp->f_dstdiffs) & D_DELETE) { in queue_file()
990 fp->f_modtime = TIME_LONG - fp->f_depth; in queue_file()
991 } else if (fp->f_info[OPT_SRC].f_type != S_IFDIR && in queue_file()
992 fp->f_info[OPT_DST].f_type != S_IFDIR) { in queue_file()
996 fp->f_modtime = fp->f_info[OPT_SRC].f_modtime; in queue_file()
997 fp->f_modns = fp->f_info[OPT_SRC].f_modns; in queue_file()
998 if (fp->f_modtime < fp->f_info[OPT_DST].f_modtime) { in queue_file()
999 fp->f_modtime = fp->f_info[OPT_DST].f_modtime; in queue_file()
1000 fp->f_modns = fp->f_info[OPT_DST].f_modns; in queue_file()
1007 fp->f_modtime = TIME_ZERO; in queue_file()
1015 if (fp->f_modtime > np->f_modtime) in queue_file()
1017 if (fp->f_modtime < np->f_modtime) in queue_file()
1019 if (fp->f_modns < np->f_modns) in queue_file()
1023 fp->f_fullname = strdup(get_name(fp)); in queue_file()
1024 fp->f_rnext = np; in queue_file()
1025 *pp = fp; in queue_file()
1090 *get_name(struct file *fp) in get_name() argument
1096 i = namelen + 1 + strlen(fp->f_name); in get_name()
1111 strcat(namebuf, fp->f_name); in get_name()