dmp_compspec and dmp_compext Kernel Services

Purpose

Specifies a component and callback parameters to be included in the dump.

Syntax

#include <sys/livedump.h>

kerrno_t dmp_compspec (flags, comp, anchor, extid, p1, p2, ..., NULL)
long flags;
long comp;
void *anchor;
dmp_extid_t *extid;
char *p1;
char *p2;
...

kerrno_t dmp_compext (extid, p1, p2, ..., NULL)
dmp_extid_t extid;
char *p1;
char *p2;
...

Parameters

Item Description
anchor Points to the associated ldmp_parms_t data structure or to an ldmp_prepare_t data structure.
comp Specifies the component, specified as indicated by the flags.
extid Points to an item of dmp_extid_t type, for the dmp_compspec kernel service, where an identifier is returned, if you use the dmp_compext kernel service to provide additional parameters for the component being dumped. This identifier might then be specified to add additional parameters to the component using the dmp_compext kernel service. The extid parameter can be NULL.
flags You can specify the following values:
DCF_FAILING
Indicates that this is the failing component. You can only specify one failing component.
DCF_FIRST
Indicates that this component is to be dumped first. Normally components are dumped in the order specified.
Note:
  • The DCF_FIRST value is only valid when the anchor refers to an ldmp_parms_t data item. It is not valid when the callback receives the RASCD_LDMP_PREPARE command.
  • The last component specified to be dumped first is the one dumped first.
DCF_LEVEL0 - DCF_LEVEL9
Indicates the detail level, 0 through 9, to dump this component. If none of these flags are set, the component is dumped at its current level.
DCF_MINIMAL
Indicates the DCF_LEVEL1 level.
DCF_NORMAL
Indicates the DCF_LEVEL3 level.
DCF_DETAIL
Indicates the DCF_LEVEL7 level.
DCF_LONG
Indicates that the parameters are two parameters of long type. Rather than passing in an unlimited number of strings, a component can be passed in two long data items, as in the case with pseudo-components.
One and only one of the following component specification flags must be given. They specify how the component is specified in the dc_component field:
DCF_BYPNAME
Indicates that the component is specified by path name.
DCF_BYLNAME
Indicates that the component is specified by logical alias.
DCF_BYTYPE
Indicates that the component is specified by type.
DCF_BYCB
Indicates that the component is specified by ras_block_t.
p1, p2 ... Specifies the component's parameters, the last of which must be NULL. If keyword parameters are being specified, The parameters must be strings, and contain the keyword and its values. If multiple keyword and value pairs appear in a single parameter, they are separated with blanks. For example, the p1 parameter can be foo=1234, and the p2 parameter can be bar=5678,16. Also, the p1 parameter can be foo=1234 bar=5678.

If the DCF_LONG flag is set, two parameters of long type are passed in. In this case, the p1 and p2 parameters contain the values of long type, and no more parameters can be specified.

Description

The dmp_compspec and dmp_compext kernel services provide components and their callback parameters for a dump. You can only use these kernel services in a live dump.

The dmp_compspec kernel service is used before you start a live dump with the livedump kernel service. You can also use this kernel service when a component's callback wants to include another component in a live dump, that is, when the callback receives the RASCD_LDMP_PREPARE command.

Multiple components can be included in a live dump.

The dmp_compext function is used to provide additional parameters for a component.

Return Values

Item Description
0 Indicates a successful completion.
EINVAL_RAS_DMP_COMPSPEC_FLAGS Indicates that the flags specification is not valid.
EINVAL_RAS_DMP_COMPSPEC_COMP Indicates that the component specification is not valid.
EINVAL_RAS_DMP_COMPSPEC_NOTAWARE Indicates that the specified component must support live dump.
EINVAL_RAS_DMP_COMPSPEC_ANCHOR Indicates that the anchor specification is not valid.
EFAULT_RAS_DMP_COMPSPEC_ANCHOR Indicates that the storage the anchor parameter refers to is not valid.
EFAULT_RAS_DMP_COMPSPEC_EXTID Indicates that the storage the extid parameter refers to is not valid.
EFAULT_RAS_DMP_COMPSPEC_PARMS Indicates that a parameter address is not valid.
EINVAL_RAS_LDMP_ESTIMATE Indicates that the anchor parameter indicates a dump size estimate request, but the dmp_compspec call was not made from the process environment.
EINVAL_RAS_DMP_COMPSPEC_NOADD Indicates that components cannot be added to this dump, that is, the dump type flags, ldpr_flags, have the LDT_NOADD bit set.
EINVAL_RAS_DMP_COMPSPEC_FAILING Indicates that the failing component has already been specified.
ENOMEM_RAS_DMP_COMPSPEC Indicates that no storage is available.
EINVAL_RAS_DMP_COMPEXT_EXTID Indicates that the extid parameter does not refer to a valid component.
EFAULT_RAS_DMP_COMPEXT_EXTID Indicates that the storage the extid parameter refers to is not valid.
EFAULT_RAS_DMP_COMPEXT_PARMS Indicates that the storage a parameter refers to is not valid.
EBUSY_RAS_DMP_COMPEXT Indicates that the specification of this component is complete, and no more parameters can be added. This happens if the component the extid parameter referred to has already completed its RASCD_LDMP_PREPARE processing.
ENOMEM_RAS_DMP_COMPEXT Indicates that no storage is available.