mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-10 17:41:54 +00:00
Merge "Fix a bug causing ectool to return error return code."
This commit is contained in:
@@ -530,11 +530,16 @@ int cmd_temperature(int argc, char *argv[])
|
||||
|
||||
printf("Reading temperature...");
|
||||
rv = read_mapped_mem8(EC_LPC_MEMMAP_TEMP_SENSOR + id);
|
||||
if (rv == 0xff)
|
||||
if (rv == 0xff) {
|
||||
printf("Sensor not present\n");
|
||||
return -1;
|
||||
} else if (rv == 0xfe) {
|
||||
printf("Error\n");
|
||||
else
|
||||
return -1;
|
||||
} else {
|
||||
printf("%d\n", rv + EC_LPC_TEMP_SENSOR_OFFSET);
|
||||
return rv;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user