3 #include "fsck_helper.h"
6 testresult_t
test_infree (void)
18 fetch_superblock(&sb
);
22 while ((inodeidx
!= NULL_INODE
) && (ret
!= corrupt
)) {
23 if (inodeidx
< sb
->itotal
) {
24 ictable_get(inodeidx
, &icstat
);
27 fret
= soReadInode(&inode
, inodeidx
);
28 if (fret
< 0) FABORT(fret
, "test_infree");
30 ictable_set(inodeidx
, idle
);
33 printf("Free inode list contains used inodes.\n");
37 printf("Free inode list closes over itself.\n");
41 printf("BUM! ictable has something strange in it.\n");
46 printf("Free inode list has a member pointing to %d, which is "
47 "outside the list.\n", inodeidx
);
50 inodeidx
= inode
.next
;
53 if ((ret
!= corrupt
) && (ifree
!= sb
->ifree
)) {
54 printf("ifree is incorrect.\n");