vfile.c (453B)
1 #include <u.h> 2 #include <libc.h> 3 #include <diskfs.h> 4 #include <venti.h> 5 6 extern void vtLibThread(void); 7 8 typedef struct DiskVenti DiskVenti; 9 struct DiskVenti 10 { 11 TvCache *c; 12 Entry e; 13 }; 14 15 Disk* 16 diskOpenVenti(TvCache *c, uchar score[VtScoreSize]) 17 { 18 vtLibThread(); 19 20 fetch vtroot 21 fetch dir block 22 copy e 23 } 24 25 Block* 26 diskVentiRead(Disk *dd, u32int len, u64int offset) 27 { 28 DiskVenti *d = (DiskVenti*)dd; 29 30 make offset list 31 walk down blocks 32 return the one 33 }