Documentation
¶
Index ¶
- func CloseMapper(ctx context.Context, module string) error
- func CreateImage(ctx context.Context, modulePath, imagePath string) error
- func CreateImageByTar(ctx context.Context, rc io.ReadCloser, imagePath string) error
- func CreateImageHash(ctx context.Context, imagePath string) (string, error)
- func CreateMapper(ctx context.Context, name, imagePath, hash string) error
- func IsSupported() bool
- func Mount(ctx context.Context, module, mountPath string) error
- func Unmount(ctx context.Context, mountPath string) error
- func VerifyImage(ctx context.Context, imagePath, rootHash string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CloseMapper ¶
CloseMapper closes device mapper for the module Equivalent shell command: veritysetup close <module>
func CreateImage ¶
CreateImage uses mkfs.erofs to create image from module dir. Equivalent shell command: mkfs.erofs --aufs --quiet -Enoinline_data -T 1750791050 -Uclear -x-1 <imagePath> <modulePath>
func CreateImageByTar ¶
CreateImageByTar uses mkfs.erofs to create image from tar. Equivalent shell command: mkfs.erofs --tar=f --aufs --quiet -Enoinline_data -T 1750791050 -Uclear -x-1 <imagePath> <modulePath>
func CreateImageHash ¶
CreateImageHash computes hash from the image by veritysetup format Equivalent shell command: veritysetup format --data-block-size=4096 --hash-block-size=4096 --salt=<salt> <imagePath> <hashPath>
func CreateMapper ¶
CreateMapper creates device mapper for the erofs image. It creates two loop devices and attach image and hash file for them. Equivalent shell command: veritysetup open <imagePath> <name> <hashPath> <hash>
func IsSupported ¶
func IsSupported() bool
IsSupported scans /proc/filesystems for erofs type, it returns whether erofs is supported
Types ¶
This section is empty.