typedef struct Dentry { vlong offset; /* offset of the dentry */ /* on-disk fields */ int mode; /* in 9p2000 format */ u16int uid; int length; /* length in bytes of the file */ u8int gid; vlong index; /* offset of the file's block index */ vlong data; /* offset of the compressed block */ int namelen; /* length in bytes of name, excluding padding */ char name[256]; /* null terminated */ } Dentry; typedef struct Super { u32int size; /* size in bytes of the file system, including the header */ u32int flags; u32int crc; u32int edition; u32int nblocks; u32int nfiles; Dentry root; } Super; enum {Blocksz = 4096}; /* pack.c */ u32int get32(uchar *); long Bpread(Biobuf *, void *buf, long n, vlong o); int readdentry(Biobuf *disk, Dentry *, vlong offset); void printdentry(char *pfx, Dentry *); void readsuper(Biobuf *disk, Super *super);