Lines Matching refs:fp

75 static errmask_t check_file(struct file *fp);
76 static diffmask_t check_changes(struct file *fp, int first, int second);
77 static int prune_file(struct file *fp);
78 static void queue_file(struct file *fp);
112 struct file *fp; in analyze() local
126 for (fp = bp->b_files; fp; fp = fp->f_next) in analyze()
127 if (fp->f_flags & F_EVALUATE) in analyze()
128 errs |= find_renames(fp); in analyze()
149 for (fp = bp->b_files; fp; fp = fp->f_next) in analyze()
150 if (fp->f_flags & (F_EVALUATE|F_STAT_ERROR)) in analyze()
151 errs |= check_file(fp); in analyze()
196 for (fp = changes; fp; fp = fp->f_rnext) in analyze()
197 if (aborted || (fp->f_flags & F_STAT_ERROR)) { in analyze()
198 fp->f_flags |= F_CONFLICT; in analyze()
200 if ((fp->f_flags & F_IN_BASELINE) == 0) in analyze()
201 fp->f_flags |= F_REMOVE; in analyze()
202 fp->f_problem = aborted ? PROB_aborted : PROB_restat; in analyze()
203 (fp->f_base)->b_unresolved++; in analyze()
209 fp->f_fullname); in analyze()
211 err = reconcile(fp); in analyze()
235 prune_file(struct file *fp) in prune_file() argument
240 if ((fp->f_flags & (F_EVALUATE|F_STAT_ERROR)) == 0) { in prune_file()
241 fp->f_flags |= F_REMOVE; in prune_file()
244 fprintf(stderr, "ANAL: PRUNE %s\n", fp->f_name); in prune_file()
248 for (cp = fp->f_files; cp; cp = cp->f_next) in prune_file()
268 struct file *fp; in prune() local
272 for (fp = bp->b_files; fp; fp = fp->f_next) in prune()
273 prunes += prune_file(fp); in prune()
292 struct file *fp; in summary() local
316 for (fp = changes; fp; fp = fp->f_rnext) { in summary()
317 if (fp->f_base != bp) in summary()
319 if ((fp->f_flags & F_CONFLICT) == 0) in summary()
321 fprintf(stderr, "\t\t%s (%s)\n", fp->f_fullname, in summary()
322 fp->f_problem ? fp->f_problem : "???"); in summary()
354 check_file(struct file *fp) in check_file() argument
358 if ((fp->f_flags & F_STAT_ERROR) == 0) { in check_file()
360 fp->f_info[OPT_BASE].f_modtime = fp->f_s_modtime; in check_file()
361 fp->f_info[OPT_BASE].f_ino = fp->f_s_inum; in check_file()
362 fp->f_info[OPT_BASE].f_d_maj = fp->f_s_maj; in check_file()
363 fp->f_info[OPT_BASE].f_d_min = fp->f_s_min; in check_file()
364 fp->f_info[OPT_BASE].f_nlink = fp->f_s_nlink; in check_file()
365 fp->f_srcdiffs |= check_changes(fp, OPT_BASE, OPT_SRC); in check_file()
368 fp->f_info[OPT_BASE].f_modtime = fp->f_d_modtime; in check_file()
369 fp->f_info[OPT_BASE].f_ino = fp->f_d_inum; in check_file()
370 fp->f_info[OPT_BASE].f_d_maj = fp->f_d_maj; in check_file()
371 fp->f_info[OPT_BASE].f_d_min = fp->f_d_min; in check_file()
372 fp->f_info[OPT_BASE].f_nlink = fp->f_d_nlink; in check_file()
373 fp->f_dstdiffs |= check_changes(fp, OPT_BASE, OPT_DST); in check_file()
376 if ((fp->f_flags & (F_IN_SOURCE|F_IN_DEST)) == 0) { in check_file()
377 fp->f_srcdiffs |= D_DELETE; in check_file()
378 fp->f_dstdiffs |= D_DELETE; in check_file()
382 if ((fp->f_dstdiffs | fp->f_srcdiffs) & D_DELETE) { in check_file()
386 if (fp->f_files) in check_file()
392 if (fp->f_srcdiffs || fp->f_dstdiffs || fp->f_flags & F_STAT_ERROR) { in check_file()
393 queue_file(fp); in check_file()
397 showflags(diffmap, fp->f_srcdiffs)); in check_file()
399 showflags(diffmap, fp->f_dstdiffs)); in check_file()
401 showflags(fileflags, fp->f_flags)); in check_file()
402 fprintf(stderr, " name=%s\n", fp->f_fullname); in check_file()
407 fp->f_base->b_totfiles++; in check_file()
411 if (fp->f_files == 0) in check_file()
426 push_name(fp->f_name); in check_file()
428 for (cp = fp->f_files; cp; cp = cp->f_next) { in check_file()
429 if (fp->f_flags & F_STAT_ERROR) in check_file()
460 check_changes(struct file *fp, int ref, int new) in check_changes() argument
465 rp = &fp->f_info[ref]; in check_changes()
466 np = &fp->f_info[new]; in check_changes()
647 find_link(struct file *fp, side_t srcdst) in find_link() argument
656 fcp = &fp->f_info[chgside]; in find_link()
657 ftp = &fp->f_info[tgtside]; in find_link()
684 if (fp == lp) in find_link()
726 if ((fp->f_base != lp->f_base) && same_name(fp, lp, chgside)) in find_link()
731 fp->f_fullname, lp->f_fullname); in find_link()
748 if (fp == lp) in find_link()
803 fp->f_fullname, lp->f_fullname); in find_link()
831 has_other_links(struct file *fp, side_t srcdst) in has_other_links() argument
835 fip = &fp->f_info[srcdst]; in has_other_links()
844 if (fp == lp) in has_other_links()
907 link_update(struct file *fp, side_t which) in link_update() argument
912 if (lp == fp) in link_update()
916 if (lp->f_info[which].f_ino != fp->f_info[which].f_ino) in link_update()
918 if (lp->f_info[which].f_d_maj != fp->f_info[which].f_d_maj) in link_update()
920 if (lp->f_info[which].f_d_min != fp->f_info[which].f_d_min) in link_update()
928 lp->f_info[which].f_type = fp->f_info[which].f_type; in link_update()
929 lp->f_info[which].f_size = fp->f_info[which].f_size; in link_update()
930 lp->f_info[which].f_mode = fp->f_info[which].f_mode; in link_update()
931 lp->f_info[which].f_uid = fp->f_info[which].f_uid; in link_update()
932 lp->f_info[which].f_gid = fp->f_info[which].f_gid; in link_update()
933 lp->f_info[which].f_modtime = fp->f_info[which].f_modtime; in link_update()
934 lp->f_info[which].f_modns = fp->f_info[which].f_modns; in link_update()
935 lp->f_info[which].f_nlink = fp->f_info[which].f_nlink; in link_update()
936 lp->f_info[which].f_rd_maj = fp->f_info[which].f_rd_maj; in link_update()
937 lp->f_info[which].f_rd_min = fp->f_info[which].f_rd_min; in link_update()
976 queue_file(struct file *fp) in queue_file() argument
985 if ((fp->f_srcdiffs|fp->f_dstdiffs) & D_DELETE) { in queue_file()
989 fp->f_modtime = TIME_LONG - fp->f_depth; in queue_file()
990 } else if (fp->f_info[OPT_SRC].f_type != S_IFDIR && in queue_file()
991 fp->f_info[OPT_DST].f_type != S_IFDIR) { in queue_file()
995 fp->f_modtime = fp->f_info[OPT_SRC].f_modtime; in queue_file()
996 fp->f_modns = fp->f_info[OPT_SRC].f_modns; in queue_file()
997 if (fp->f_modtime < fp->f_info[OPT_DST].f_modtime) { in queue_file()
998 fp->f_modtime = fp->f_info[OPT_DST].f_modtime; in queue_file()
999 fp->f_modns = fp->f_info[OPT_DST].f_modns; in queue_file()
1006 fp->f_modtime = TIME_ZERO; in queue_file()
1014 if (fp->f_modtime > np->f_modtime) in queue_file()
1016 if (fp->f_modtime < np->f_modtime) in queue_file()
1018 if (fp->f_modns < np->f_modns) in queue_file()
1022 fp->f_fullname = strdup(get_name(fp)); in queue_file()
1023 fp->f_rnext = np; in queue_file()
1024 *pp = fp; in queue_file()
1089 *get_name(struct file *fp) in get_name() argument
1095 i = namelen + 1 + strlen(fp->f_name); in get_name()
1110 strcat(namebuf, fp->f_name); in get_name()