mirror of
https://github.com/AsahiLinux/m1n1
synced 2024-11-22 14:43:08 +00:00
Issue error message if firmware_set_fdt fails
Signed-off-by: Daniel Berlin <dberlin@dberlin.org>
This commit is contained in:
parent
31ee1499f8
commit
da1f50be74
1 changed files with 9 additions and 1 deletions
|
@ -12,6 +12,12 @@
|
||||||
struct fw_version_info os_firmware;
|
struct fw_version_info os_firmware;
|
||||||
struct fw_version_info system_firmware;
|
struct fw_version_info system_firmware;
|
||||||
|
|
||||||
|
#define bail(...) \
|
||||||
|
do { \
|
||||||
|
printf(__VA_ARGS__); \
|
||||||
|
return -1; \
|
||||||
|
} while (0)
|
||||||
|
|
||||||
const struct fw_version_info fw_versions[NUM_FW_VERSIONS] = {
|
const struct fw_version_info fw_versions[NUM_FW_VERSIONS] = {
|
||||||
[V_UNKNOWN] = {V_UNKNOWN, "unknown", {0}, 1, "unknown"},
|
[V_UNKNOWN] = {V_UNKNOWN, "unknown", {0}, 1, "unknown"},
|
||||||
[V12_1] = {V12_1, "12.1", {12, 1, 0}, 3, "iBoot-7429.61.2"},
|
[V12_1] = {V12_1, "12.1", {12, 1, 0}, 3, "iBoot-7429.61.2"},
|
||||||
|
@ -39,7 +45,9 @@ int firmware_set_fdt(void *fdt, int node, const char *prop, const struct fw_vers
|
||||||
data[i] = cpu_to_fdt32(ver->num[i]);
|
data[i] = cpu_to_fdt32(ver->num[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
return fdt_setprop(fdt, node, prop, data, ver->num_length * sizeof(u32));
|
if (fdt_setprop(fdt, node, prop, data, ver->num_length * sizeof(u32)))
|
||||||
|
bail("FDT: couldn't set %s property to firmware info", prop);
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void detect_firmware(struct fw_version_info *info, const char *ver)
|
static void detect_firmware(struct fw_version_info *info, const char *ver)
|
||||||
|
|
Loading…
Reference in a new issue