mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-21 03:10:02 +02:00
fix
This commit is contained in:
parent
a101e18d60
commit
74348afcf6
@ -256,6 +256,12 @@ int allowKernelUpdate(char *mess) {
|
|||||||
#endif
|
#endif
|
||||||
char retvals[MAX_STR_LENGTH] = {0};
|
char retvals[MAX_STR_LENGTH] = {0};
|
||||||
if (executeCommand(CMD_GET_AMD_FLASH, retvals, logDEBUG1) == FAIL) {
|
if (executeCommand(CMD_GET_AMD_FLASH, retvals, logDEBUG1) == FAIL) {
|
||||||
|
// no amd found
|
||||||
|
if (strstr(retvals, "No result") != NULL) {
|
||||||
|
LOG(logINFO, ("\tNot Amd Flash\n"));
|
||||||
|
return OK;
|
||||||
|
}
|
||||||
|
// could not figure out if amd
|
||||||
snprintf(
|
snprintf(
|
||||||
mess, MAX_STR_LENGTH,
|
mess, MAX_STR_LENGTH,
|
||||||
"Could not update %s. (Could not figure out if Amd flash: %s)\n",
|
"Could not update %s. (Could not figure out if Amd flash: %s)\n",
|
||||||
@ -263,10 +269,7 @@ int allowKernelUpdate(char *mess) {
|
|||||||
LOG(logERROR, (mess));
|
LOG(logERROR, (mess));
|
||||||
return FAIL;
|
return FAIL;
|
||||||
}
|
}
|
||||||
// amd flash found
|
// amd, only current kernel works with amd flash
|
||||||
if (strlen(retvals) > 1) {
|
|
||||||
LOG(logINFO, ("\tAmd Flash found\n"));
|
|
||||||
// only current kernel works with amd flash
|
|
||||||
if (validateKernelVersion(KERNEL_DATE_VRSN_3GPIO) == FAIL) {
|
if (validateKernelVersion(KERNEL_DATE_VRSN_3GPIO) == FAIL) {
|
||||||
getKernelVersion(retvals);
|
getKernelVersion(retvals);
|
||||||
snprintf(mess, MAX_STR_LENGTH,
|
snprintf(mess, MAX_STR_LENGTH,
|
||||||
@ -276,10 +279,7 @@ int allowKernelUpdate(char *mess) {
|
|||||||
LOG(logERROR, (mess));
|
LOG(logERROR, (mess));
|
||||||
return FAIL;
|
return FAIL;
|
||||||
}
|
}
|
||||||
} else {
|
LOG(logINFO, ("\tAmd flash with compatible kernel version\n"));
|
||||||
LOG(logINFO, ("\tNot Amd Flash\n"));
|
|
||||||
}
|
|
||||||
LOG(logINFO, ("\tKernel and flash ok for updating kernel\n"));
|
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user