use iocshSetError()
This commit is contained in:
@@ -39,7 +39,7 @@ static void asSetSubstitutionsCallFunc(const iocshArgBuf *args)
|
||||
static const iocshFuncDef asInitFuncDef = {"asInit",0};
|
||||
static void asInitCallFunc(const iocshArgBuf *args)
|
||||
{
|
||||
asInit();
|
||||
iocshSetError(asInit());
|
||||
}
|
||||
|
||||
/* asdbdump */
|
||||
|
||||
@@ -39,7 +39,7 @@ static const iocshFuncDef dbLoadDatabaseFuncDef =
|
||||
{"dbLoadDatabase",3,dbLoadDatabaseArgs};
|
||||
static void dbLoadDatabaseCallFunc(const iocshArgBuf *args)
|
||||
{
|
||||
dbLoadDatabase(args[0].sval,args[1].sval,args[2].sval);
|
||||
iocshSetError(dbLoadDatabase(args[0].sval,args[1].sval,args[2].sval));
|
||||
}
|
||||
|
||||
/* dbLoadRecords */
|
||||
@@ -49,7 +49,7 @@ static const iocshArg * const dbLoadRecordsArgs[2] = {&dbLoadRecordsArg0,&dbLoad
|
||||
static const iocshFuncDef dbLoadRecordsFuncDef = {"dbLoadRecords",2,dbLoadRecordsArgs};
|
||||
static void dbLoadRecordsCallFunc(const iocshArgBuf *args)
|
||||
{
|
||||
dbLoadRecords(args[0].sval,args[1].sval);
|
||||
iocshSetError(dbLoadRecords(args[0].sval,args[1].sval));
|
||||
}
|
||||
|
||||
/* dbb */
|
||||
|
||||
@@ -22,7 +22,7 @@ static const iocshFuncDef dbLoadTemplateFuncDef =
|
||||
{"dbLoadTemplate", 2, dbLoadTemplateArgs};
|
||||
static void dbLoadTemplateCallFunc(const iocshArgBuf *args)
|
||||
{
|
||||
dbLoadTemplate(args[0].sval, args[1].sval);
|
||||
iocshSetError(dbLoadTemplate(args[0].sval, args[1].sval));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -22,28 +22,28 @@
|
||||
static const iocshFuncDef iocInitFuncDef = {"iocInit",0,NULL};
|
||||
static void iocInitCallFunc(const iocshArgBuf *args)
|
||||
{
|
||||
iocInit();
|
||||
iocshSetError(iocInit());
|
||||
}
|
||||
|
||||
/* iocBuild */
|
||||
static const iocshFuncDef iocBuildFuncDef = {"iocBuild",0,NULL};
|
||||
static void iocBuildCallFunc(const iocshArgBuf *args)
|
||||
{
|
||||
iocBuild();
|
||||
iocshSetError(iocBuild());
|
||||
}
|
||||
|
||||
/* iocRun */
|
||||
static const iocshFuncDef iocRunFuncDef = {"iocRun",0,NULL};
|
||||
static void iocRunCallFunc(const iocshArgBuf *args)
|
||||
{
|
||||
iocRun();
|
||||
iocshSetError(iocRun());
|
||||
}
|
||||
|
||||
/* iocPause */
|
||||
static const iocshFuncDef iocPauseFuncDef = {"iocPause",0,NULL};
|
||||
static void iocPauseCallFunc(const iocshArgBuf *args)
|
||||
{
|
||||
iocPause();
|
||||
iocshSetError(iocPause());
|
||||
}
|
||||
|
||||
/* coreRelease */
|
||||
@@ -77,7 +77,7 @@ static const iocshArg * const systemArgs[] = {&systemArg0};
|
||||
static const iocshFuncDef systemFuncDef = {"system",1,systemArgs};
|
||||
static void systemCallFunc(const iocshArgBuf *args)
|
||||
{
|
||||
system(args[0].sval);
|
||||
iocshSetError(system(args[0].sval));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -277,7 +277,7 @@ static const iocshFuncDef rrddFuncDef =
|
||||
{"$subname", 1, rrddArgs};
|
||||
static void rrddCallFunc(const iocshArgBuf *)
|
||||
{
|
||||
$subname(*iocshPpdbbase);
|
||||
iocshSetError($subname(*iocshPpdbbase));
|
||||
}
|
||||
|
||||
} // extern "C"
|
||||
|
||||
@@ -76,7 +76,7 @@ static const iocshFuncDef chdirFuncDef = {"cd",1,chdirArgs};
|
||||
static void chdirCallFunc(const iocshArgBuf *args)
|
||||
{
|
||||
if (args[0].sval == NULL ||
|
||||
chdir(args[0].sval)) {
|
||||
iocshSetError(chdir(args[0].sval))) {
|
||||
fprintf(stderr, "Invalid directory path, ignored\n");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user