mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-21 11:20:04 +02:00
snprintf and linked server to be respawned, not copied one
This commit is contained in:
parent
8db1dfb2ce
commit
6cf5072293
@ -367,10 +367,10 @@ int waitForFPGAtoTouchFlash(char *mess) {
|
||||
|
||||
// convert to int
|
||||
if (sscanf(retvals, "%d\n", &result) != 1) {
|
||||
sprintf(mess,
|
||||
"Could not program fpga. (could not scan int for gpio "
|
||||
"status: [%s])\n",
|
||||
retvals);
|
||||
snprintf(mess, MAX_STR_LENGTH,
|
||||
"Could not program fpga. (could not scan int for gpio "
|
||||
"status: [%s])\n",
|
||||
retvals);
|
||||
LOG(logERROR, (mess));
|
||||
return FAIL;
|
||||
}
|
||||
|
@ -4301,7 +4301,7 @@ int copy_detector_server(int file_des) {
|
||||
// add new link name to /etc/inittab
|
||||
if (ret == OK) {
|
||||
format = "echo 'ttyS0::respawn:/./%s' >> /etc/inittab";
|
||||
if (snprintf(cmd, MAX_STR_LENGTH, format, sname) >=
|
||||
if (snprintf(cmd, MAX_STR_LENGTH, format, LINKED_SERVER_NAME) >=
|
||||
MAX_STR_LENGTH) {
|
||||
ret = FAIL;
|
||||
strcpy(mess, "Could not copy detector server. Command "
|
||||
|
Loading…
x
Reference in New Issue
Block a user