diff --git a/modules/database/src/std/dev/devAaiSoft.c b/modules/database/src/std/dev/devAaiSoft.c index aafdd1bcd..f2e4a41f9 100644 --- a/modules/database/src/std/dev/devAaiSoft.c +++ b/modules/database/src/std/dev/devAaiSoft.c @@ -48,8 +48,8 @@ static long init_record(dbCommon *pcommon) DBLINK *plink = &prec->inp; /* Ask record to call us in pass 1 instead */ - if (prec->pact != 2) { - return 2; + if (prec->pact != AAI_DEVINIT_PASS1) { + return AAI_DEVINIT_PASS1; } if (dbLinkIsConstant(plink)) { diff --git a/modules/database/src/std/rec/aaiRecord.c b/modules/database/src/std/rec/aaiRecord.c index 157a48f5b..756b892ab 100644 --- a/modules/database/src/std/rec/aaiRecord.c +++ b/modules/database/src/std/rec/aaiRecord.c @@ -119,9 +119,9 @@ static long init_record(struct dbCommon *pcommon, int pass) if (pdset->common.init_record) { long status = pdset->common.init_record(pcommon); - if (status == 2) { + if (status == AAI_DEVINIT_PASS1) { /* requesting pass 1 callback, remember to do that */ - prec->pact = 2; + prec->pact = AAI_DEVINIT_PASS1; } else if (status) return status; @@ -134,7 +134,7 @@ static long init_record(struct dbCommon *pcommon, int pass) return 0; } - if (prec->pact == 2) { + if (prec->pact == AAI_DEVINIT_PASS1) { /* device support asked for an init_record() callback in pass 1 */ long status = pdset->common.init_record(pcommon); if (status) diff --git a/modules/database/src/std/rec/aaiRecord.dbd.pod b/modules/database/src/std/rec/aaiRecord.dbd.pod index b3dd19216..969f5800f 100644 --- a/modules/database/src/std/rec/aaiRecord.dbd.pod +++ b/modules/database/src/std/rec/aaiRecord.dbd.pod @@ -155,8 +155,8 @@ If device support includes an C routine it is called, but unlike most record types this occurs in pass 0, which allows the device support to allocate the array buffer itself. -Since EPICS 7.0.5 the device support may return 2 to request a second call to -its C routine in pass 1. +Since EPICS 7.0.5 the device support may return C to request +a second call to its C routine in pass 1. Checks if device support allocated array space. If not, space for the array is allocated using NELM and FTVL. The array address is stored in BPTR. @@ -299,10 +299,11 @@ Scan forward link if necessary, set PACT FALSE, and return. %/* Declare Device Support Entry Table */ %struct aaiRecord; %typedef struct aaidset { - % dset common; /*init_record returns: (-1,0,2)=>(failure,success,callback)*/ + % dset common; /*init_record returns: (-1,0,AAI_DEVINIT_PASS1)=>(failure,success,callback)*/ % long (*read_aai)(struct aaiRecord *prec); /*returns: (-1,0)=>(failure,success)*/ %} aaidset; %#define HAS_aaidset + %#define AAI_DEVINIT_PASS1 2 % field(VAL,DBF_NOACCESS) { prompt("Value") @@ -484,8 +485,8 @@ The record will use C for this memory allocation if BPTR has not been set by this routine. The routine must return 0 for success, -1 or a error status on failure. -Since EPICS 7.0.5 if this routine returns 2 in pass 0, it will be called again -in pass 1 with the PACT field set to 2. +Since EPICS 7.0.5 if this routine returns C in pass 0, it +will be called again in pass 1 with the PACT field set to C. In pass 0 the PACT field is set to zero (FALSE). =head4 get_ioint_info