HP-UX Reference (11i v2 04/09) - 7 Device (Special) Files, 9 General Information, Index (vol 10)
s
sad(7) sad(7)
sap_lastminor
Specifies the range of minor devices.
sap_npush
Specifies the number of modules to push. This number must be no more than
MAX-
APUSH, which is defined in
<sad.h>. Additionally, this number must not exceed
NSTRPUSH.
sap_list
Specifies, in order, the array of modules to push.
SAD_GAP Lets you use the sad driver to obtain
autopush configuration information for a device by
setting the
sap_major and sap_minor fields of the
strapush structure (see the SAD_SAP
command) to the major and minor device numbers of the device being queried.
arg should point to a struct of type
strapush. Upon successful completion, the strapush
structure contains all of the information used to configure the device. Values of 0 (zero) will
appear in any unused entry in the module list.
SAD_VML Enables you to check a list of modules. For example, you can determine if a specific module
has been installed. The arg parameter points to a
str_list structure (defined in the
<stropts.h> header file), whose members are as follows:
struct str_list {
int sl_nmods;
struct str_mlist *sl_modlist;
};
sl_nmods
Specifies the number of entries you have allocated in an array.
sl_modlist
Points to the array of module names. The str_mlist structure (also in the
<stropts.h> header file) is as follows:
struct str_mlist {
char l_name[FMNAMESZ+1];
};
where l_name specifies the array of module names.
If the
l_name array is valid, the SAD_VML command returns a value of 0 (zero).
If the array contains an invalid module name, the command returns a value of 1.
Upon failure, the command returns a value of -1.
Notes
As a STREAMS driver, sad also supports the normal STREAMS I_STR ioctl():
int ioctl(fildes, I_STR, strp);
int fildes;
struct strioctl *strp;
In this form, specify the ic_cmd field in the strioctl structure to either SAD_SAP, SAD_GAP,or
SAD_VML. The ic_dp field points to the strapush structure (see the SAD_SAP command in the
DESCRIPTION section). Refer to the streamio (7) reference page for further details.
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.
Section 7−−128 Hewlett-Packard Company − 2 − HP-UX 11i Version 2: September 2004