Lines Matching refs:sb
49 const struct stat *sb, int typeflags) in debug_cb() argument
55 if (S_ISREG (sb->st_mode)) sb_type = "REG"; in debug_cb()
56 if (S_ISDIR (sb->st_mode)) sb_type = "DIR"; in debug_cb()
57 if (S_ISLNK (sb->st_mode)) sb_type = "LNK"; in debug_cb()
67 printf ("%s %5d %-3s %-3s %s\n", which, (int)(sb->st_ino % 100000), sb_type, ftw_type, fpath); in debug_cb()
75 check_same_stats (const struct stat *sb, const char *as_fname) in check_same_stats() argument
81 if (as.st_mode == sb->st_mode in check_same_stats()
82 && as.st_ino == sb->st_ino in check_same_stats()
83 && as.st_size == sb->st_size) in check_same_stats()
90 callback_phys (const char *fpath, const struct stat *sb, int typeflags, struct FTW *ftwbuf) in callback_phys() argument
92 debug_cb ("P", fpath, sb, typeflags); in callback_phys()
102 if (S_ISLNK (sb->st_mode) && typeflags == FTW_SL) in callback_phys()
107 check_same_stats (sb, "link1-bad"); in callback_phys()
113 if (S_ISLNK (sb->st_mode) && typeflags == FTW_SL) in callback_phys()
118 check_same_stats (sb, "link2-ok"); in callback_phys()
124 if (S_ISREG (sb->st_mode) && typeflags == FTW_F) in callback_phys()
129 check_same_stats (sb, "link2-tgt"); in callback_phys()
136 callback_log (const char *fpath, const struct stat *sb, int typeflags, struct FTW *ftwbuf) in callback_log() argument
138 debug_cb ("L", fpath, sb, typeflags); in callback_log()
150 if (S_ISLNK (sb->st_mode) && typeflags == FTW_SLN) in callback_log()
155 check_same_stats (sb, "link1-bad"); in callback_log()
162 if (S_ISREG (sb->st_mode) && typeflags == FTW_F) in callback_log()
167 check_same_stats (sb, "link2-tgt"); in callback_log()
173 if (S_ISREG (sb->st_mode) && typeflags == FTW_F) in callback_log()
178 check_same_stats (sb, "link2-tgt"); in callback_log()