#include #include #include #include daddr_t blkno = 1; char *dargv[] = { 0, "/dev/rp0", "/dev/rp3", 0 }; struct filsys sblock; int fi; daddr_t alloc(); main(argc, argv) char **argv; { int i; if(argc <= 1) { for(argc = 1; dargv[argc]; argc++); argv = dargv; } for(i=1; i=NICFREE) { printf("bad free count, b=%D\n", blkno); return(0); } b = sblock.s_free[i]; if(b == 0) return(0); if(b=sblock.s_fsize) { printf("bad free block (%D)\n", b); return(0); } if(sblock.s_nfree <= 0) { bread(b, (char *)&buf, sizeof(buf)); blkno = b; sblock.s_nfree = buf.df_nfree; for(i=0; i