Changes or queries the physical attachment of a file.
Item | Description | |
---|---|---|
gnode | Points to a gnode structure. | |
cmd | Specifies the operation to
be performed. The cmd parameter can be one of the following
values:
|
|
arg | Points to a structure containing
information for the specified cmd parameter. F_ATTACH attach_desc_t F_DETACH detach_desc_t F_ATTINFO attinfo_desc_t |
The gn_common_memcntl subroutine is to be called by file system vnop_memcntl implementations. It performs the normal function of such operations. If the cmd parameter is set to F_ATTACH, the gn_common_memcntl subroutine attaches the segment specified by the gn_seg field in the gnode structure. If the cmd parameter is set to F_DETACH, the gn_common_memcntl subroutine detaches the segment. If the cmd parameter is set to F_ATTINFO, the gn_common_memcntl subroutine returns information about the current state of attachment.
Item | Description |
---|---|
0 | Success. |
non-zero | Failure. |
Item | Description |
---|---|
EINVAL | The cmd parameter is not valid. |
ENOMEM | Resources are not available to attach the memory segment. |