Documentation ¶
Overview ¶
Package devtmpfs provides an implementation of /dev based on tmpfs, analogous to Linux's devtmpfs.
Index ¶
Constants ¶
const Name = "devtmpfs"
Name is the default filesystem name.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Accessor ¶
type Accessor struct {
// contains filtered or unexported fields
}
Accessor allows devices to create device special files in devtmpfs.
func NewAccessor ¶
func NewAccessor(ctx context.Context, vfsObj *vfs.VirtualFilesystem, creds *auth.Credentials, fsTypeName string) (*Accessor, error)
NewAccessor returns an Accessor that supports creation of device special files in the devtmpfs instance registered with name fsTypeName in vfsObj.
func (*Accessor) CreateDeviceFile ¶
func (a *Accessor) CreateDeviceFile(ctx context.Context, pathname string, kind vfs.DeviceKind, major, minor uint32, perms uint16) error
CreateDeviceFile creates a device special file at the given pathname in the devtmpfs instance accessed by the Accessor.
type FilesystemType ¶
type FilesystemType struct {
// contains filtered or unexported fields
}
FilesystemType implements vfs.FilesystemType.
+stateify savable
func (*FilesystemType) GetFilesystem ¶
func (fst *FilesystemType) GetFilesystem(ctx context.Context, vfsObj *vfs.VirtualFilesystem, creds *auth.Credentials, source string, opts vfs.GetFilesystemOptions) (*vfs.Filesystem, *vfs.Dentry, error)
GetFilesystem implements vfs.FilesystemType.GetFilesystem.
func (*FilesystemType) Name ¶
func (*FilesystemType) Name() string
Name implements vfs.FilesystemType.Name.
func (*FilesystemType) Release ¶
func (fst *FilesystemType) Release(ctx context.Context)
Release implements vfs.FilesystemType.Release.