Go to main content

man pages section 9: DDI and DKI Driver Entry Points

Exit Print View

Updated: Thursday, June 13, 2019
 
 

print(9E)

Name

print - display a driver message on system console

Synopsis

#include <sys/types.h>
#include <sys/errno.h>
#include <sys/ddi.h>
#include <sys/sunddi.h>

int prefixprint(dev_t dev, char *str);

Interface Level

Architecture independent level 1 (DDI/DKI). This entry point is required for block devices.

Parameters

dev

Device number.

str

Pointer to a character string describing the problem.

Description

The print() routine is called by the kernel when it has detected an exceptional condition (such as out of space) in the device. To display the message on the console, the driver should use the cmn_err(9F) kernel function. The driver should print the message along with any driver specific information.

Return Values

The print() routine should return 0 for success, or the appropriate error number. The print routine can fail if the driver implemented a non-standard print() routine that attempted to perform error logging, but was unable to complete the logging for whatever reason.

See Also

cmn_err(9F)

Writing Device Drivers in Oracle Solaris 11.4