blackfin server is not in memory

This commit is contained in:
2021-11-11 10:06:47 +01:00
parent ec1ee635d5
commit 85d350b48b
3 changed files with 22 additions and 5 deletions

View File

@ -574,3 +574,23 @@ int waitForFPGAtoTouchFlash(char *mess) {
LOG(logINFO, ("\tFPGA has picked up the program from flash\n"));
return OK;
}
int moveBinaryFile(char *mess, char *serverName) {
char *format = "mv %s %s";
if (snprintf(cmd, MAX_STR_LENGTH, format, TEMP_PROG_FILE_NAME,
serverName) >= MAX_STR_LENGTH) {
strcpy(mess, "Could not copy detector server. Command "
"to move server binary is too long\n");
LOG(logERROR, (mess));
return FAIL;
}
if (executeCommand(cmd, retvals, logDEBUG1) == FAIL) {
snprintf(mess, MAX_STR_LENGTH,
"Could not copy detector server (moving). %s\n", retvals);
LOG(logERROR, (mess));
return FAIL;
}
LOG(logINFO, ("\tmoved from temp folder to main with proper name (%s)\n",
serverName));
return OK;
}