mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-23 10:07:59 +02:00
merge fix
This commit is contained in:
@ -477,8 +477,9 @@ int setupDetectorServer(char *mess, char *sname) {
|
||||
LOG(logINFO, ("\tinittab: DetectoServer line deleted\n"));
|
||||
|
||||
// add new link name to /etc/inittab
|
||||
char *format = "echo 'ttyS0::respawn:/./%s' >> /etc/inittab";
|
||||
if (snprintf(cmd, MAX_STR_LENGTH, format, linkname) >= MAX_STR_LENGTH) {
|
||||
if (snprintf(cmd, MAX_STR_LENGTH,
|
||||
"echo 'ttyS0::respawn:/./%s' >> /etc/inittab",
|
||||
linkname) >= MAX_STR_LENGTH) {
|
||||
strcpy(mess, "Could not copy detector server. Command "
|
||||
"to add new server for spawning is too long\n");
|
||||
LOG(logERROR, (mess));
|
||||
@ -584,8 +585,8 @@ int moveBinaryFile(char *mess, char *dest, char *src, char *errorPrefix) {
|
||||
// one can move into the current process binary (will not interfere in
|
||||
// kernel mode)
|
||||
|
||||
char *format = "mv %s %s";
|
||||
if (snprintf(cmd, MAX_STR_LENGTH, format, src, dest) >= MAX_STR_LENGTH) {
|
||||
if (snprintf(cmd, MAX_STR_LENGTH, "mv %s %s", src, dest) >=
|
||||
MAX_STR_LENGTH) {
|
||||
sprintf(mess, "Could not %s. Command to move binary is too long\n",
|
||||
errorPrefix);
|
||||
LOG(logERROR, (mess));
|
||||
|
Reference in New Issue
Block a user