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

mc_open, mc_closeoptional device open and close entry points

#include <sys/mac_provider.h>

int
prefix_m_open(void *driver);

void
prefix_m_close(void *driver);

illumos DDI specific

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

The () and () 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 () and () entry points are serialized. Only one such call will be issued to the device driver at any time.

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

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

August 18, 2016 OmniOS