HP-UX Reference (11i v3 07/02) - 2 System Calls (vol 5)

p
pstat(2) pstat(2)
data. The only candidate fields to have resulted in this condition are those fields with validity macros
explicitly defined in the corresponding
pst_* data structure. The other fields within that particular
structure need not be checked using this method.
See also the ERRORS section below.
ERRORS
If a pstat function fails,
errno is set to one of the following values. If an underlying function fails,
errno
may be set to a value not specified here; see errno(2) for such errors.
[EACCES] The UID is not 0 (superuser) and the effective UID does not match for
pstat_getfiledetails()
, pstat_getsocket()
, pstat_getstream()
,or
pstat_getpathname()
. See pstat_getfiledetails()
for the definition of
effective UID match.
[EFAULT] buf or fid points to an invalid address.
[EINTR] For
pstat_getsocket()
the operation was terminated due to the receipt of a signal;
no data was transferred.
[EINVAL] For
pstat_getfile2()
, pstat_getlv() , pstat_getmsg(),
pstat_getproc(), pstat_getprocvm()
, pstat_getpset(),
pstat_getsem(),or
pstat_getshm(), elemcount was not 0, and index was less
than
0.
[EINVAL] elemsize is less than or equal to 0 or elemsize is larger than the size of the associated data
structure. For example, elemsize is greater than
sizeof(struct
pst_processor) for
pstat_getprocessor()
.
[EINVAL] For
pstat_getcrashinfo()
, pstat_getdynamic(),
pstat_getipc(),
pstat_getstable()
, pstat_getstatic(),orpstat_getvminfo()
, elem-
count is not
1 or index is not 0.
[EINVAL] For pstat_getcrashdev()
, pstat_getdisk(), pstat_getnode()
,
pstat_getpmq(), pstat_getprocessor()
, pstat_getpsem()
,or
pstat_getswap(), elemcount is not greater than or equal to
1 or index is not greater
than or equal to
0.
[EINVAL] For pstat_getnode()
, index is not a valid logical node ID.
[EINVAL] For
pstat_getpathname()
, elemcount is less than or equal to 0.
[EINVAL]
pstat_getfiledetails()
was called for a socket other than the AF_UNIX family,
or
pstat_getpathname()
was called for a socket.
[EINVAL]
pstat_getsocket()
was called for a file that is not of type socket.
[EINVAL]
pstat_getcommandline()
was called with pid less than 0 or elemcount not equal to
1.
[ENOBUFS] For pstat_getsocket()
, the operation was terminated due to unavailability of buffer
space.
[ENOENT] For
pstat_getfile2(), pstat_getfiledetails()
,
pstat_getpathname(), pstat_getsocket()
,orpstat_getstream(), the
file was not found, or it was closed.
For
pstat_getmpathname(), the specified file system was not found or the file system
did not have DNLC entries.
[ENOSTR] pstat_getstream() was called for a file that is neither a stream nor a stream-based
pipe or socket.
[ENOSYS] The requested pstat function is not implemented or not configured in the system.
[EOVERFLOW]
The offset element is too large to store into the structure pointed to by the buf parameter.
[EOVERFLOW]
For pstat_getfiledetails(), a value to be stored would overflow one of the
members of the pst_filedetails structure. The psfd_valid member indicates
the field that overflowed.
306 Hewlett-Packard Company 16 HP-UX 11i Version 3: February 2007