DDI_DRIVER_MAJOR(9F) Kernel Functions for Drivers DDI_DRIVER_MAJOR(9F)

ddi_driver_major - return driver's major device number

#include <sys/ddi.h>
#include <sys/sunddi.h>
major_t ddi_driver_major(dev_info_t *dip);

illumos DDI specific (illumos DDI)

ddi_driver_major() returns the major device number for the driver associated with the supplied dev_info node. This value can then be used as an argument to makedevice(9F) to construct a complete dev_t.

dip

A pointer to the device's dev_info structure.

ddi_driver_major() returns the major number of the driver bound to a device, if any, or DDI_MAJOR_T_NONE otherwise.

ddi_driver_major() can be called from kernel or interrupt context.

ddi_driver_name(9F)

Writing Device Drivers

June 18, 2001 OmniOS