FIle System Format
The disk is 512 byte blocks, with a superblock:
struct sup {
UINT isize; /* number of blocks devoted to ilist */
UINT fsize; /* largest file block + 1 */
UINT nfree; /* number of free blocks in free[] */
UINT free[100]; /* free block numbers */
UINT ninode; /* number of free inumbers in inode[] */
UINT inode[100];/* free inode numbers */
char flock; /* irrelevant on disk */
char ilock; /* irrelevant on disk */
ULONG time; /* time of last umount */
};
this is followed by inode blocks, fully packed with 16 disk inodes
struct dsknod {
UINT mode; /* see below */
char nlinks; /* number of directory links */
UCHAR uid; /* user id of owner */
UCHAR gid; /* group id of owner */
UCHAR size0; /* high byte of 24-bit size */
UINT size1; /* low word of 24-bit size */
UINT addr[8]; /* block numbers or device number */
ULONG rtime; /* time of last read */
ULONG wtime; /* time of last write */
};
the freelist of blocks is a chain.
code to deal with all this is in src/fstools/fslib.c