devtmpfs

package
v0.0.0-...-957f62e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 10, 2023 License: Apache-2.0, MIT Imports: 10 Imported by: 0

Documentation

Overview

Package devtmpfs provides an implementation of /dev based on tmpfs, analogous to Linux's devtmpfs.

Index

Constants

View Source
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.

func (*Accessor) Release

func (a *Accessor) Release(ctx context.Context)

Release must be called when a is no longer in use.

func (*Accessor) UserspaceInit

func (a *Accessor) UserspaceInit(ctx context.Context) error

UserspaceInit creates symbolic links and mount points in the devtmpfs instance accessed by the Accessor that are created by userspace in Linux. It does not create mounts.

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.

func (*FilesystemType) StateFields

func (fst *FilesystemType) StateFields() []string

func (*FilesystemType) StateLoad

func (fst *FilesystemType) StateLoad(stateSourceObject state.Source)

+checklocksignore

func (*FilesystemType) StateSave

func (fst *FilesystemType) StateSave(stateSinkObject state.Sink)

+checklocksignore

func (*FilesystemType) StateTypeName

func (fst *FilesystemType) StateTypeName() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL