Merge branch 'FixShellCommands' into PSI-7.0

This commit is contained in:
2018-09-28 11:41:52 +02:00
9 changed files with 17 additions and 28 deletions
+2 -2
View File
@@ -755,7 +755,7 @@ long dbBufferSize(short dbr_type, long options, long no_elements)
int dbLoadDatabase(const char *file, const char *path, const char *subs)
{
if (!file) {
printf("Usage: dbLoadDatabase (\"file\", \"path\", \"subs\")\n");
printf("Usage: dbLoadDatabase \"file\", \"path\", \"subs\"\n");
return -1;
}
return dbReadDatabase(&pdbbase, file, path, subs);
@@ -766,7 +766,7 @@ int dbLoadRecords(const char* file, const char* subs)
int status;
if (!file) {
printf("Usage: dbLoadRecords (\"file\", \"subs\")\n");
printf("Usage: dbLoadRecords \"file\", \"subs\"\n");
return -1;
}
status = dbReadDatabase(&pdbbase, file, 0, subs);
+3 -3
View File
@@ -284,7 +284,7 @@ long dbb(const char *record_name)
* Convert name to address
*/
if (!record_name) {
printf("Usage: dbb (\"record_name\")\n");
printf("Usage: dbb \"record_name\"\n");
return -1;
}
status = dbNameToAddr(record_name, &addr);
@@ -408,7 +408,7 @@ long dbd(const char *record_name)
* Convert name to address
*/
if (!record_name) {
printf("Usage: dbd (\"record_name\")\n");
printf("Usage: dbd \"record_name\"\n");
return -1;
}
status = dbNameToAddr(record_name, &addr);
@@ -855,7 +855,7 @@ long dbap(const char *record_name)
* Convert name to address
*/
if (!record_name) {
printf("Usage: dbap (\"record_name\")\n");
printf("Usage: dbap \"record_name\"\n");
return -1;
}
status = dbNameToAddr(record_name, &addr);
+1 -1
View File
@@ -597,7 +597,7 @@ long dbtpn(char *pname, char *pvalue)
processNotify *ppn=NULL;
if (!pname) {
printf("Usage: dbtpn (\"name\", \"value\")\n");
printf("Usage: dbtpn \"name\", \"value\"\n");
return -1;
}
chan = dbChannelCreate(pname);
+4 -3
View File
@@ -37,6 +37,9 @@ dbStateId dbStateFind(const char *name)
ELLNODE *node;
dbStateId id;
if (!name)
return NULL;
for (node = ellFirst(&states); node; node = ellNext(node)) {
id = CONTAINER(node, dbState, node);
if (strcmp(id->name, name) == 0)
@@ -50,10 +53,8 @@ dbStateId dbStateCreate(const char *name)
dbStateId id;
if (!name)
{
printf("Usage: dbStateCreate (\"name\")\n");
return NULL;
}
if ((id = dbStateFind(name)))
return id;
+3 -3
View File
@@ -41,7 +41,7 @@ int gft(const char *pname)
int i;
if (!pname) {
printf("Usage: gft (\"name\")\n");
printf("Usage: gft \"pv_name\"\n");
return -1;
}
chan = dbChannel_create(pname);
@@ -99,7 +99,7 @@ int pft(const char *pname, const char *pvalue)
double doublevalue;
if (!pname || !pvalue) {
printf("Usage: pft (\"name\", \"value\")\n");
printf("Usage: pft \"pv_name\", \"value\"\n");
return -1;
}
chan = dbChannel_create(pname);
@@ -232,7 +232,7 @@ int tpn(const char *pname, const char *pvalue)
processNotify *ppn = NULL;
if (!pname || !pvalue) {
printf("Usage: tpn (\"name\", \"value\")\n");
printf("Usage: tpn \"pv_name\", \"value\"\n");
return -1;
}
chan = dbChannel_create(pname);