OpenWrt – Blame information for rev 1
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
1 | office | 1 | --- a/arch/mips/bcm63xx/boards/board_bcm963xx.c |
2 | +++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c |
||
3 | @@ -707,10 +707,20 @@ void __init board_prom_init(void) |
||
4 | |||
5 | /* dump cfe version */ |
||
6 | cfe = boot_addr + BCM963XX_CFE_VERSION_OFFSET; |
||
7 | - if (!memcmp(cfe, "cfe-v", 5)) |
||
8 | - snprintf(cfe_version, sizeof(cfe_version), "%u.%u.%u-%u.%u", |
||
9 | - cfe[5], cfe[6], cfe[7], cfe[8], cfe[9]); |
||
10 | - else |
||
11 | + if (strstarts(cfe, "cfe-")) { |
||
12 | + if(cfe[4] == 'v') { |
||
13 | + if(cfe[5] == 'd') |
||
14 | + snprintf(cfe_version, 11, "%s", (char *) &cfe[5]); |
||
15 | + else if (cfe[10] > 0) |
||
16 | + snprintf(cfe_version, sizeof(cfe_version), "%u.%u.%u-%u.%u-%u", |
||
17 | + cfe[5], cfe[6], cfe[7], cfe[8], cfe[9], cfe[10]); |
||
18 | + else |
||
19 | + snprintf(cfe_version, sizeof(cfe_version), "%u.%u.%u-%u.%u", |
||
20 | + cfe[5], cfe[6], cfe[7], cfe[8], cfe[9]); |
||
21 | + } else { |
||
22 | + snprintf(cfe_version, 12, "%s", (char *) &cfe[4]); |
||
23 | + } |
||
24 | + } else |
||
25 | strcpy(cfe_version, "unknown"); |
||
26 | pr_info("CFE version: %s\n", cfe_version); |
||
27 |