iocsh allow setting of error code

This commit is contained in:
Michael Davidsaver committed 2019-05-02 20:38:45 -07:00
1 parent 89c269e2d5
commit eba8a13a2c
2 files changed
+13

No files matched your search

+11
View File
@@ -511,6 +511,17 @@ typedef struct {
bool errored;
} Scope;
int iocshSetError(int err)
{
Scope *scope;
if (err && iocshScopeId) {
scope = (Scope *) epicsThreadPrivateGet(iocshScopeId);
if(scope) scope->errored = 1;
}
return err;
}
/*
* The body of the command interpreter
*/