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,7 +367,7 @@ int waitForFPGAtoTouchFlash(char *mess) {
|
|||||||
|
|
||||||
// convert to int
|
// convert to int
|
||||||
if (sscanf(retvals, "%d\n", &result) != 1) {
|
if (sscanf(retvals, "%d\n", &result) != 1) {
|
||||||
sprintf(mess,
|
snprintf(mess, MAX_STR_LENGTH,
|
||||||
"Could not program fpga. (could not scan int for gpio "
|
"Could not program fpga. (could not scan int for gpio "
|
||||||
"status: [%s])\n",
|
"status: [%s])\n",
|
||||||
retvals);
|
retvals);
|
||||||
|
@ -4301,7 +4301,7 @@ int copy_detector_server(int file_des) {
|
|||||||
// add new link name to /etc/inittab
|
// add new link name to /etc/inittab
|
||||||
if (ret == OK) {
|
if (ret == OK) {
|
||||||
format = "echo 'ttyS0::respawn:/./%s' >> /etc/inittab";
|
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) {
|
MAX_STR_LENGTH) {
|
||||||
ret = FAIL;
|
ret = FAIL;
|
||||||
strcpy(mess, "Could not copy detector server. Command "
|
strcpy(mess, "Could not copy detector server. Command "
|
||||||
|
Loading…
x
Reference in New Issue
Block a user