Documentation
¶
Overview ¶
Package efs reads the SGI EFS filesystem: 512-byte basic blocks, 128-byte inodes grouped in cylinder groups, extent-mapped files. Read only — this package serves install media, it never writes.
Index ¶
Constants ¶
const ( SuperMagic = 0x00072959 SuperMagicGrown = 0x0007295a )
SuperMagic is the classic EFS superblock magic. SuperMagicGrown marks a grown filesystem; both are accepted.
const RootIno uint32 = 2
RootIno is the inode number of the filesystem root directory.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Extent ¶
type Extent struct {
Block uint32 // first basic block, filesystem-relative
Len uint32 // run length in blocks
Offset uint32 // logical block offset within the file
}
Extent is one contiguous run of basic blocks. Offset is the logical block position within the file; a gap between extents is a hole that reads as zeros.
type FS ¶
type FS struct {
// contains filtered or unexported fields
}
FS is an open EFS filesystem over a block image.
func Open ¶
Open reads and validates the superblock of the EFS filesystem starting at baseBlock (in 512-byte blocks) within r.
func (*FS) Lookup ¶
Lookup resolves a slash-separated path from the root. Symlinks in the path are not followed; install media use them rarely and the callers serve them as links.
func (*FS) ReadAt ¶
ReadAt reads from the file at byte offset off into p, returning io.EOF past the end as io.ReaderAt requires. Holes between extents read as zeros.