Contents

buf_setdevice

Set the device associated with a buffer.

Declaration

errno_t buf_setdevice(buf_t bp, vnode_t vp);

Parameters

  • bp:

    Buffer whose device ID to set.

  • vp:

    Device to set on the buffer.

Return Value

0 for success, EINVAL if vp is not a device file.

Discussion

A buffer's device is set in buf_strategy() (or in buf_getblk() if the file is a device). It is also set on an iobuf if buf_alloc() is passed a device vnode.

See Also

Buffers