-/* The match routine for protocols < 30. */
-static void match_idevs(int32 *ndx_list, int ndx_count)
-{
- int32 from, prev;
- struct file_struct *file, *file_next;
- struct idev *idev, *idev_next;
-
- qsort(ndx_list, ndx_count, sizeof ndx_list[0],
- (int (*)()) hlink_compare_idev);
-
- for (from = 0; from < ndx_count; from++) {
- for (file = FPTR(ndx_list[from]), idev = F_HL_IDEV(file), prev = -1;
- from < ndx_count-1;
- file = file_next, idev = idev_next, prev = ndx_list[from++])
- {
- file_next = FPTR(ndx_list[from+1]);
- idev_next = F_HL_IDEV(file_next);
- if (idev->dev != idev_next->dev || idev->ino != idev_next->ino)
- break;
- pool_free(hlink_pool, 0, idev);
- if (prev < 0)
- file->flags |= FLAG_HLINK_FIRST;
- F_HL_PREV(file) = prev;
- }
- pool_free(hlink_pool, 0, idev);
- if (prev < 0)
- file->flags &= ~FLAG_HLINKED;
- else {
- file->flags |= FLAG_HLINK_LAST;
- F_HL_PREV(file) = prev;
- }
- }
-}
-
-/* The match routine for protocols >= 30. */