3 #include "fsck_helper.h"
6 testresult_t
test_infree (void)
18 fetch_superblock(&sb
);
22 while (inodeidx
!= NULL_INODE
) {
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("Inode number %u is marked as used and is in free"
34 "inode list.\n", inodeidx
);
38 printf("Free inode list closes over itself.\n");
42 printf("BUM! ictable has something strange in it.\n");
47 printf("Free inode list has a member pointing to %u, which is "
48 "outside the list.\n", inodeidx
);
51 inodeidx
= inode
.next
;
54 if (ifree
!= sb
->ifree
) {
55 printf("ifree is %u, should be %u.\n", sb
->ifree
, ifree
);