コード例 #1
0
ファイル: grok_os9_disk.go プロジェクト: strickyak/doing_os9
func ReadAtLen(pos int, sz int) []byte {
	_, err := os.Stdin.Seek(int64(pos), 0)
	if err != nil {
		panic(err)
	}
	return D.ReadN(os.Stdin, sz)
}
コード例 #2
0
ファイル: grok_os9_disk.go プロジェクト: strickyak/doing_os9
func main() {

	bb := D.ReadN(os.Stdin, 256)

	fmt.Println("=== SECTOR ZERO ===\n")
	D.PrintRecords(D.Sector0, bb)
	fmt.Println("\n")

	rootInode := D.FindInt(D.Sector0, bb, "DD.DIR")
	PrintInode(rootInode, "/")
}