MC_OPEN(9E) Driver Entry Points MC_OPEN(9E)

NAME


mc_open, mc_close - optional device open and close entry points

SYNOPSIS


#include <sys/mac_provider.h>

int
prefix_m_open(void *driver);

void
prefix_m_close(void *driver);

INTERFACE LEVEL


illumos DDI specific

PARAMETERS


driver A pointer to the driver's private data that was passed in
via the m_pdata member of the mac_register(9S) structure
to the mac_register(9F) function.

DESCRIPTION


The mc_open() and mc_close() entry points are called when the file
system node corresponding to the device is opened. Standard device
drivers do not need to implement this function and should not define
the callback.

The GLDv3 guarantees that calls to the mc_open() and mc_close() entry
points are serialized. Only one such call will be issued to the device
driver at any time.

RETURN VALUES


Upon successful completion, the device driver should return 0 for its
mc_open() entry point. Otherwise, it should return a non-zero error
number to indicate an error occurred.

SEE ALSO


mac(9E), mac_register(9F), mac_register(9S)

illumos August 18, 2016 illumos

tribblix@gmail.com :: GitHub :: Privacy