Writing Device Drivers

getinfo(9E)

SunOS 5.7 system:

	int xxgetinfo(dev_info_t *dip, ddi_info_cmd_t cmd,
 		void *arg, void **resultp)

Make sure that the minor number to instance number and the reverse translation is static, since getinfo(9E) may be called when the device is not attached. For example:

	#define XXINST(dev) (getminor(dev) >> 3)

This is a required entry point; it cannot be replaced with nulldev(9F) or nodev(9F).