From e5cc6ad87c74f763fd755d17af492b3dff9af00b Mon Sep 17 00:00:00 2001 From: Marty Kraimer Date: Fri, 12 Jun 1998 12:37:05 +0000 Subject: [PATCH] Fixed dbReportDeviceConfig so that it correctly handles LINR --- src/dbStatic/dbReadTest.c | 1 + src/dbStatic/dbStaticLib.c | 15 +++++++++++---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/dbStatic/dbReadTest.c b/src/dbStatic/dbReadTest.c index 9a78a54e3..de7bc1055 100644 --- a/src/dbStatic/dbReadTest.c +++ b/src/dbStatic/dbReadTest.c @@ -89,6 +89,7 @@ int main(int argc,char **argv) gphDump(pdbbase->pgpHash); dbDumpMenu(pdbbase,NULL); dbDumpRecord(pdbbase,NULL,0); + dbReportDeviceConfig(pdbbase,stdout); dbFreeBase(pdbbase); */ return(0); diff --git a/src/dbStatic/dbStaticLib.c b/src/dbStatic/dbStaticLib.c index 7ee689a52..391103d5e 100644 --- a/src/dbStatic/dbStaticLib.c +++ b/src/dbStatic/dbStaticLib.c @@ -3629,15 +3629,22 @@ void epicsShareAPI dbReportDeviceConfig(dbBase *pdbbase,FILE *report) if(status) break; strcpy(dtypValue,dbGetString(pdbentry)); status = dbFindField(pdbentry,"LINR"); - if(status || *((short *)pdbentry->pfield) <=1 ) { - cvtValue[0] = 0; + if(status) { + cvtValue[0] = 0; } else { + if(strcmp(dbGetString(pdbentry),"LINEAR")!=0) { + cvtValue[0] = 0; + } else { strcpy(cvtValue,"cvt("); status = dbFindField(pdbentry,"EGUL"); if(!status) strcat(cvtValue,dbGetString(pdbentry)); - status = dbFindField(pdbentry,"EGUH"); - if(!status) strcat(cvtValue,dbGetString(pdbentry)); + status = dbFindField(pdbentry,"EGUF"); + if(!status) { + strcat(cvtValue,","); + strcat(cvtValue,dbGetString(pdbentry)); + } strcat(cvtValue,")"); + } } fprintf(report,"%-8s %-20s %-20s %-20s %-s\n", busName,linkValue,dtypValue,