STREAMS-UX Programmer's Guide (February 2007)

STREAMS Administrative Driver
Overview
Appendix D
253
Return Value Unless specified otherwise, upon successful completion, the sad IOCTL commands return a
value of 0 (zero). Otherwise, a value of -1 is returned.
Errors If any of the following conditions occur, the sad IOCTL commands return the corresponding value:
SAD_SAP
[EEXIST] The specified major/minor device number pair (sad_major/sad_minor) has already been
configured.
[EFAULT] The
arg
parameter points outside the allocated address space.
[EINVAL] The major device number (sad_major) is invalid, the number of modules (sap_list
[MAXAPUSH][FMNAMESZ+1]) is invalid, or the list of module names is invalid.
[ENODEV] The device is not configured for autopush. This value is returned from a SAD_GAP command.
[ENOSR] A internal autopush data structure cannot be allocated.
[ENOSTR] The major device does not represent a STREAMS driver.
[ERANGE] The sap_lastminor field is less than the sap_minor field when the command is SAP_RANGE,
or the minor device specified in a SAP_CLEAR command does not exist.
[EACCES] Only superuser is allowed to execute the SAD_SAP IOCTL.
SAD_GAP
[EFAULT] The
arg
parameter points outside the allocated address space.
[EINVAL] The major device number (sad_major) is invalid.
[ENODEV] The device is not configured for autopush.
[ENOSTR] The major device does not represent a STREAMS driver.
SAD_VML
[EFAULT] The
arg
parameter points outside the allocated address space.
[EINVAL] The list of module names is invalid.