Analyze the hard-links in the file-list by creating a list of all the * items that have hlink data, sorting them, and matching up identical * values into clusters. These will be a single linked list from last * to first when we're done. */
| 184 | * values into clusters. These will be a single linked list from last |
| 185 | * to first when we're done. */ |
| 186 | void match_hard_links(struct file_list *flist) |
| 187 | { |
| 188 | if (!list_only && flist->used) { |
| 189 | int i, ndx_count = 0; |
| 190 | int32 *ndx_list; |
| 191 | |
| 192 | ndx_list = new_array(int32, flist->used); |
| 193 | |
| 194 | for (i = 0; i < flist->used; i++) { |
| 195 | if (F_IS_HLINKED(flist->sorted[i])) |
| 196 | ndx_list[ndx_count++] = i; |
| 197 | } |
| 198 | |
| 199 | hlink_flist = flist; |
| 200 | |
| 201 | if (ndx_count) |
| 202 | match_gnums(ndx_list, ndx_count); |
| 203 | |
| 204 | free(ndx_list); |
| 205 | } |
| 206 | if (protocol_version < 30) |
| 207 | idev_destroy(); |
| 208 | } |
| 209 | |
| 210 | static int maybe_hard_link(struct file_struct *file, int ndx, |
| 211 | char *fname, int statret, stat_x *sxp, |
no test coverage detected