FileOperations
Defined in: src/fs/devtmpfs.ts:35
The operations a device driver provides, like Linux’s struct file_operations.
Properties
Section titled “Properties”ioctl?
Section titled “ioctl?”
optionalioctl?:Record<number,DeviceIoctl>
Defined in: src/fs/devtmpfs.ts:51
optionalopen?: (file) =>void
Defined in: src/fs/devtmpfs.ts:36
Parameters
Section titled “Parameters”Returns
Section titled “Returns”void
optionalpoll?: (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.
Parameters
Section titled “Parameters”Returns
Section titled “Returns”number
poll_wait?
Section titled “poll_wait?”
optionalpoll_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.
Parameters
Section titled “Parameters”Returns
Section titled “Returns”WaitQueue | undefined
optionalread?: (file,buffer,start,end) =>number|void
Defined in: src/fs/devtmpfs.ts:38
Parameters
Section titled “Parameters”buffer
Section titled “buffer”Uint8Array
number
number
Returns
Section titled “Returns”number | void
release?
Section titled “release?”
optionalrelease?: (file) =>void
Defined in: src/fs/devtmpfs.ts:37
Parameters
Section titled “Parameters”Returns
Section titled “Returns”void
optionalsync?: (file) =>void
Defined in: src/fs/devtmpfs.ts:40
Parameters
Section titled “Parameters”Returns
Section titled “Returns”void
write?
Section titled “write?”
optionalwrite?: (file,buffer,offset) =>number|void
Defined in: src/fs/devtmpfs.ts:39
Parameters
Section titled “Parameters”buffer
Section titled “buffer”Uint8Array
offset
Section titled “offset”number
Returns
Section titled “Returns”number | void