vnop_memcntl Entry Point

Purpose

Changes or queries the physical attachment of a file.

Syntax

#include <sys/vnode.h>
#include <sys/fcntl.h>

int vnop_memcntl (vnode, cmd, arg, crp)
struct gnode * vnode;
int cmd;
void * arg;
struct ucred * crp;

Parameters

Item Description
vnode Points to the virtual node of the file
cmd Specifies the operation to be performed. The cmd parameter can be one of the following values:
  • F_ATTACH
  • F_DETACH
  • F_ATTINFO
arg Points to a structure containing the attach_desc_t, detach_desc_t or attinfo_desc_t information according to the specified cmd parameter.

F_ATTACH attach_desc_t

F_DETACH detach_desc_t

F_ATTINFO attinfo_desc_t

crp Points to the cred structure. This structure contains data that the file system can use to validate access permission.

Description

The vnop_memcntl entry point requests memory attachment operations as specified by the cmd parameter. The cmd parameter determines the arg structure.

Execution Environment

The vnop_memcntl entry point can be called from the process environment only.

Return Values

Item Description
0 Success.
non-zero Failure.