Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions asApp/src/dbrestore.c
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ STATIC long scalar_restore(int pass, DBENTRY *pdbentry, char *PVname, char *valu

status = dbPutString(pdbentry, value_string);
if (save_restoreDebug >= 15) {
errlogPrintf("dbrestore:scalar_restore: dbPutString() returns %ld:", status);
errlogPrintf("dbrestore:scalar_restore: dbPutString() returns: %ld\n", status);
errMessage(status, " ");
}

Expand All @@ -268,7 +268,7 @@ STATIC long scalar_restore(int pass, DBENTRY *pdbentry, char *PVname, char *valu
if (pass == 0) {
status = dbPutString(pdbentry, value_string);
if (save_restoreDebug >= 15) {
errlogPrintf("dbrestore:scalar_restore: dbPutString() returns %ld:", status);
errlogPrintf("dbrestore:scalar_restore: dbPutString() returns: %ld\n", status);
errMessage(status, " ");
}
} else if (save_restoreDebug > 1) {
Expand All @@ -280,7 +280,7 @@ STATIC long scalar_restore(int pass, DBENTRY *pdbentry, char *PVname, char *valu
n = (int)atol(value_string);
status = dbPutMenuIndex(pdbentry, n);
if (save_restoreDebug >= 15) {
errlogPrintf("dbrestore:scalar_restore: dbPutMenuIndex() returns %ld:", status);
errlogPrintf("dbrestore:scalar_restore: dbPutMenuIndex() returns: %ld\n", status);
errMessage(status, " ");
}
break;
Expand Down Expand Up @@ -816,7 +816,7 @@ int reboot_restore(char *filename, initHookState init_state)
errlogPrintf("*** restoring from '%s' at initHookState %d (%s record/device init) ***\n", fname,
(int)init_state, pass ? "after" : "before");
if ((inp_fd = fopen_and_check(fname, &status)) == NULL) {
errlogPrintf("save_restore: Can't open save file.");
errlogPrintf("save_restore: Can't open save file.\n");
if (pStatusVal) *pStatusVal = SR_STATUS_FAIL;
if (statusStr) strNcpy(statusStr, "Can't open save file.", STATUS_STR_LEN - 1);
dbFinishEntry(pdbentry);
Expand All @@ -843,7 +843,7 @@ int reboot_restore(char *filename, initHookState init_state)

/* Skip header line if it exists */
if (fgets(buffer, BUF_SIZE, inp_fd) == NULL && ferror(inp_fd)) {
printf("save_restore:reboot_restore: Error reading from file\n");
errlogPrintf("save_restore:reboot_restore: Error reading from file\n");
return ERROR;
}
if (save_restoreDebug >= 1) { errlogPrintf("dbrestore:reboot_restore: header line '%s'\n", buffer); }
Expand Down Expand Up @@ -1293,7 +1293,7 @@ FILE *fopen_and_check(const char *fname, long *status)
if (++backup_sequence_num >= save_restoreNumSeqFiles) backup_sequence_num = 0;
}

errlogPrintf("save_restore: Can't find a file to restore from...");
errlogPrintf("save_restore: Can't find a file to restore from...\n");
errlogPrintf("save_restore: ...last tried '%s'. I give up.\n", file);
printf("save_restore: **********************************\n\n");
return (0);
Expand Down Expand Up @@ -1550,7 +1550,7 @@ int eraseFile(const char *filename)

fname = macEnvExpand(filename);
if (fname == NULL) {
printf("save_restore:eraseFile: macEnvExpand('%s') returned NULL\n", filename);
errlogPrintf("save_restore:eraseFile: macEnvExpand('%s') returned NULL\n", filename);
return (ERROR);
}
if ((fd = fopen(fname, "w")) != NULL) { fclose(fd); }
Expand All @@ -1566,7 +1566,7 @@ int appendToFile(const char *filename, const char *line)

fname = macEnvExpand(filename);
if (fname == NULL) {
printf("save_restore:appendToFile: macEnvExpand('%s') returned NULL\n", filename);
errlogPrintf("save_restore:appendToFile: macEnvExpand('%s') returned NULL\n", filename);
return (ERROR);
}
if ((fd = fopen(fname, "a")) != NULL) {
Expand Down
18 changes: 9 additions & 9 deletions asApp/src/save_restore.c
Original file line number Diff line number Diff line change
Expand Up @@ -1535,7 +1535,7 @@ STATIC int get_channel_values(struct chlist *plist)
}
}
if (ca_pend_io(MIN(10.0, .1 * num_channels)) != ECA_NORMAL) {
printf("save_restore:get_channel_values: not all gets completed");
printf("save_restore:get_channel_values: not all gets completed\n");
not_connected++;
}

Expand Down Expand Up @@ -2248,18 +2248,18 @@ STATIC int create_data_set(char *filename, /* save set request file
/* initialize save_restore routines */
if (!save_restore_init) {
if ((sr_mutex = epicsMutexCreate()) == 0) {
printf("save_restore:create_data_set: could not create list header mutex");
printf("save_restore:create_data_set: could not create list header mutex\n");
return (ERROR);
}
opMsgQueue = epicsMessageQueueCreate(OP_MSG_QUEUE_SIZE, OP_MSG_SIZE);
if (opMsgQueue == NULL) {
printf("save_restore:create_data_set: could not create message queue");
printf("save_restore:create_data_set: could not create message queue\n");
return (ERROR);
}
taskID = epicsThreadCreate("save_restore", taskPriority, epicsThreadGetStackSize(epicsThreadStackBig),
(EPICSTHREADFUNC)save_restore, 0);
if (taskID == NULL) {
printf("save_restore:create_data_set: could not create save_restore task");
printf("save_restore:create_data_set: could not create save_restore task\n");
return (ERROR);
}
save_restore_init = 1;
Expand All @@ -2283,7 +2283,7 @@ STATIC int create_data_set(char *filename, /* save set request file
while (plist != 0) {
if (!strcmp(plist->reqFile, filename)) {
if (plist->save_method & save_method) {
printf("save_restore:create_data_set: '%s' already in %x mode", filename, save_method);
printf("save_restore:create_data_set: '%s' already in %x mode\n", filename, save_method);
unlockList();
return (ERROR);
} else {
Expand All @@ -2292,7 +2292,7 @@ STATIC int create_data_set(char *filename, /* save set request file
if (trigger_channel) {
strNcpy(plist->trigger_channel, trigger_channel, PV_NAME_LEN);
} else {
printf("save_restore:create_data_set: no trigger channel");
printf("save_restore:create_data_set: no trigger channel\n");
unlockList();
return (ERROR);
}
Expand All @@ -2319,7 +2319,7 @@ STATIC int create_data_set(char *filename, /* save set request file

/* create a new channel list */
if ((plist = (struct chlist *)calloc(1, sizeof(struct chlist))) == (struct chlist *)0) {
printf("save_restore:create_data_set: channel list calloc failed");
printf("save_restore:create_data_set: channel list calloc failed\n");
return (ERROR);
}
if (macrostring && (strlen(macrostring) > 0)) {
Expand Down Expand Up @@ -3194,7 +3194,7 @@ STATIC int do_manual_restore(char *filename, int file_type, char *macrostring)
inp_fd = fopen(restoreFile, "r");
}
if (inp_fd == NULL) {
printf("save_restore:do_manual_restore: Can't open save file.");
printf("save_restore:do_manual_restore: Can't open save file.\n");
strNcpy(SR_recentlyStr, "Manual restore failed", STATUS_STR_LEN);
return (ERROR);
}
Expand Down Expand Up @@ -3567,7 +3567,7 @@ STATIC int readReqFile(const char *reqFile, struct chlist *plist, char *macrostr
plist->status = SR_STATUS_WARN;
strNcpy(plist->statusStr, "Can't alloc channel memory", EBUF_SIZE);
TRY_TO_PUT_AND_FLUSH(DBR_STRING, plist->statusStr_chid, &plist->statusStr);
printf("save_restore:readReqFile: channel calloc failed");
printf("save_restore:readReqFile: channel calloc failed\n");
} else {
/* add new element to the list */
#if BACKWARDS_LIST
Expand Down
Loading