mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-06 18:10:40 +02:00
merge fix
This commit is contained in:
commit
f7286d29fa
@ -137,8 +137,6 @@ sls_enable_cxx_warning("-Wnull-dereference")
|
|||||||
sls_enable_cxx_warning("-Wduplicated-cond")
|
sls_enable_cxx_warning("-Wduplicated-cond")
|
||||||
sls_disable_cxx_warning("-Wclass-memaccess")
|
sls_disable_cxx_warning("-Wclass-memaccess")
|
||||||
sls_disable_c_warning("-Wstringop-truncation")
|
sls_disable_c_warning("-Wstringop-truncation")
|
||||||
sls_disable_c_warning("-Wformat-nonliteral")
|
|
||||||
sls_disable_c_warning("-Wformat-truncation")
|
|
||||||
|
|
||||||
|
|
||||||
if(SLS_USE_SANITIZER)
|
if(SLS_USE_SANITIZER)
|
||||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -477,8 +477,9 @@ int setupDetectorServer(char *mess, char *sname) {
|
|||||||
LOG(logINFO, ("\tinittab: DetectoServer line deleted\n"));
|
LOG(logINFO, ("\tinittab: DetectoServer line deleted\n"));
|
||||||
|
|
||||||
// add new link name to /etc/inittab
|
// add new link name to /etc/inittab
|
||||||
char *format = "echo 'ttyS0::respawn:/./%s' >> /etc/inittab";
|
if (snprintf(cmd, MAX_STR_LENGTH,
|
||||||
if (snprintf(cmd, MAX_STR_LENGTH, format, linkname) >= MAX_STR_LENGTH) {
|
"echo 'ttyS0::respawn:/./%s' >> /etc/inittab",
|
||||||
|
linkname) >= MAX_STR_LENGTH) {
|
||||||
strcpy(mess, "Could not copy detector server. Command "
|
strcpy(mess, "Could not copy detector server. Command "
|
||||||
"to add new server for spawning is too long\n");
|
"to add new server for spawning is too long\n");
|
||||||
LOG(logERROR, (mess));
|
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
|
// one can move into the current process binary (will not interfere in
|
||||||
// kernel mode)
|
// kernel mode)
|
||||||
|
|
||||||
char *format = "mv %s %s";
|
if (snprintf(cmd, MAX_STR_LENGTH, "mv %s %s", src, dest) >=
|
||||||
if (snprintf(cmd, MAX_STR_LENGTH, format, src, dest) >= MAX_STR_LENGTH) {
|
MAX_STR_LENGTH) {
|
||||||
sprintf(mess, "Could not %s. Command to move binary is too long\n",
|
sprintf(mess, "Could not %s. Command to move binary is too long\n",
|
||||||
errorPrefix);
|
errorPrefix);
|
||||||
LOG(logERROR, (mess));
|
LOG(logERROR, (mess));
|
||||||
|
@ -225,8 +225,7 @@ int emptyTempFolder(char *mess) {
|
|||||||
char cmd[MAX_STR_LENGTH] = {0};
|
char cmd[MAX_STR_LENGTH] = {0};
|
||||||
char retvals[MAX_STR_LENGTH] = {0};
|
char retvals[MAX_STR_LENGTH] = {0};
|
||||||
|
|
||||||
char *format = "rm -fr %s";
|
if (snprintf(cmd, MAX_STR_LENGTH, "rm -fr %s",
|
||||||
if (snprintf(cmd, MAX_STR_LENGTH, format,
|
|
||||||
TEMP_PROG_FOLDER_NAME_ALL_FILES) >= MAX_STR_LENGTH) {
|
TEMP_PROG_FOLDER_NAME_ALL_FILES) >= MAX_STR_LENGTH) {
|
||||||
sprintf(mess,
|
sprintf(mess,
|
||||||
"Could not update %s. Command to empty %s folder is too long\n",
|
"Could not update %s. Command to empty %s folder is too long\n",
|
||||||
@ -433,8 +432,7 @@ int eraseFlash(char *mess) {
|
|||||||
#endif
|
#endif
|
||||||
char cmd[MAX_STR_LENGTH] = {0};
|
char cmd[MAX_STR_LENGTH] = {0};
|
||||||
char retvals[MAX_STR_LENGTH] = {0};
|
char retvals[MAX_STR_LENGTH] = {0};
|
||||||
char *format = "flash_eraseall %s";
|
if (snprintf(cmd, MAX_STR_LENGTH, "flash_eraseall %s", flashDriveName) >=
|
||||||
if (snprintf(cmd, MAX_STR_LENGTH, format, flashDriveName) >=
|
|
||||||
MAX_STR_LENGTH) {
|
MAX_STR_LENGTH) {
|
||||||
sprintf(mess, "Could not %s. Command to erase flash is too long\n",
|
sprintf(mess, "Could not %s. Command to erase flash is too long\n",
|
||||||
messageType);
|
messageType);
|
||||||
|
@ -167,8 +167,7 @@ int eraseFlash(char *mess) {
|
|||||||
char cmd[MAX_STR_LENGTH] = {0};
|
char cmd[MAX_STR_LENGTH] = {0};
|
||||||
char retvals[MAX_STR_LENGTH] = {0};
|
char retvals[MAX_STR_LENGTH] = {0};
|
||||||
|
|
||||||
char *format = "flash_erase %s 0 0";
|
if (snprintf(cmd, MAX_STR_LENGTH, "flash_erase %s 0 0", flashDriveName) >=
|
||||||
if (snprintf(cmd, MAX_STR_LENGTH, format, flashDriveName) >=
|
|
||||||
MAX_STR_LENGTH) {
|
MAX_STR_LENGTH) {
|
||||||
sprintf(mess, "Could not %s. Command to erase flash is too long\n",
|
sprintf(mess, "Could not %s. Command to erase flash is too long\n",
|
||||||
messageType);
|
messageType);
|
||||||
|
@ -4144,9 +4144,8 @@ int copy_detector_server(int file_des) {
|
|||||||
char cmd[MAX_STR_LENGTH] = {0};
|
char cmd[MAX_STR_LENGTH] = {0};
|
||||||
|
|
||||||
// tftp server
|
// tftp server
|
||||||
char *format = "tftp %s -r %s -g";
|
if (snprintf(cmd, MAX_STR_LENGTH, "tftp %s -r %s -g", hostname,
|
||||||
if (snprintf(cmd, MAX_STR_LENGTH, format, hostname, sname) >=
|
sname) >= MAX_STR_LENGTH) {
|
||||||
MAX_STR_LENGTH) {
|
|
||||||
ret = FAIL;
|
ret = FAIL;
|
||||||
strcpy(mess, "Could not copy detector server. Command to copy "
|
strcpy(mess, "Could not copy detector server. Command to copy "
|
||||||
"server too long\n");
|
"server too long\n");
|
||||||
@ -9255,8 +9254,11 @@ int get_kernel_version(int file_des) {
|
|||||||
// get only
|
// get only
|
||||||
ret = getKernelVersion(retvals);
|
ret = getKernelVersion(retvals);
|
||||||
if (ret == FAIL) {
|
if (ret == FAIL) {
|
||||||
snprintf(mess, MAX_STR_LENGTH, "Could not get kernel version. %s\n",
|
if (snprintf(mess, MAX_STR_LENGTH, "Could not get kernel version. %s\n",
|
||||||
retvals);
|
retvals) >= MAX_STR_LENGTH) {
|
||||||
|
ret = FAIL;
|
||||||
|
strcpy(mess, "Could not get kernel version. Reason too long to copy\n");
|
||||||
|
}
|
||||||
LOG(logERROR, (mess));
|
LOG(logERROR, (mess));
|
||||||
} else {
|
} else {
|
||||||
LOG(logDEBUG1, ("kernel version: [%s]\n", retvals));
|
LOG(logDEBUG1, ("kernel version: [%s]\n", retvals));
|
||||||
|
@ -6,10 +6,10 @@
|
|||||||
#define APILIB 0x211027
|
#define APILIB 0x211027
|
||||||
#define APIRECEIVER 0x211020
|
#define APIRECEIVER 0x211020
|
||||||
#define APIGUI 0x211021
|
#define APIGUI 0x211021
|
||||||
#define APICTB 0x211111
|
#define APICTB 0x211117
|
||||||
#define APIGOTTHARD 0x211111
|
#define APIGOTTHARD 0x211117
|
||||||
#define APIGOTTHARD2 0x211111
|
#define APIGOTTHARD2 0x211117
|
||||||
#define APIJUNGFRAU 0x211111
|
#define APIJUNGFRAU 0x211117
|
||||||
#define APIMYTHEN3 0x211111
|
#define APIMYTHEN3 0x211117
|
||||||
#define APIMOENCH 0x211111
|
#define APIMOENCH 0x211111
|
||||||
#define APIEIGER 0x211111
|
#define APIEIGER 0x211117
|
||||||
|
Loading…
x
Reference in New Issue
Block a user