Skip to content

FileOperations

Defined in: src/fs/devtmpfs.ts:35

The operations a device driver provides, like Linux’s struct file_operations.

optional ioctl?: Record<number, DeviceIoctl>

Defined in: src/fs/devtmpfs.ts:51


optional open?: (file) => void

Defined in: src/fs/devtmpfs.ts:36

DeviceFile

void


optional poll?: (file) => number

Defined in: src/fs/devtmpfs.ts:45

Which of EPOLLIN and EPOLLOUT the device is ready for right now, i.e. the mask f_op->poll gives back. Without this a device is always taken to be ready.

DeviceFile

number


optional poll_wait?: (file) => WaitQueue | undefined

Defined in: src/fs/devtmpfs.ts:50

What to sleep on until that changes, i.e. the queue poll_wait registers on. A device with one is a device a read can block on.

DeviceFile

WaitQueue | undefined


optional read?: (file, buffer, start, end) => number | void

Defined in: src/fs/devtmpfs.ts:38

DeviceFile

Uint8Array

number

number

number | void


optional release?: (file) => void

Defined in: src/fs/devtmpfs.ts:37

DeviceFile

void


optional sync?: (file) => void

Defined in: src/fs/devtmpfs.ts:40

DeviceFile

void


optional write?: (file, buffer, offset) => number | void

Defined in: src/fs/devtmpfs.ts:39

DeviceFile

Uint8Array

number

number | void