diff options
| author | Sander Vanheule | 2021-09-01 19:15:57 +0000 |
|---|---|---|
| committer | Rafał Miłecki | 2021-10-05 13:42:00 +0000 |
| commit | cf73a8909553822ef7c28b4e8a3a9e5e9832e7d3 (patch) | |
| tree | 89f73d56b55bf1ed62860ee2be8a8e66e6df5a16 | |
| parent | 9003dc12330fe699a4ac93f2038fabf6ef017a3f (diff) | |
| download | firmware-utils-cf73a8909553822ef7c28b4e8a3a9e5e9832e7d3.tar.gz | |
firmware-utils: tplink-safeloader: use revision field
The structured soft-version partition has a field which contains a
(source) revision number. Factory images used to include this, but
it was accidentaly removed during an earlier refactoring.
Include the source revision number again in the generated soft-version
partition. Additionaly, also show this revision number when printing
image info.
Fixes: 1a211af2cb3b ("firmware-utils: tplink-safeloader: refactor meta-partition generation")
Signed-off-by: Sander Vanheule <sander@svanheule.net>
| -rw-r--r-- | src/tplink-safeloader.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/tplink-safeloader.c b/src/tplink-safeloader.c index 597c48b..dcc9d87 100644 --- a/src/tplink-safeloader.c +++ b/src/tplink-safeloader.c @@ -2722,6 +2722,7 @@ static struct image_partition_entry make_soft_version( .year_lo = bcd(tm->tm_year%100), .month = bcd(tm->tm_mon+1), .day = bcd(tm->tm_mday), + .rev = htonl(rev), .compat_level = htonl(info->soft_ver_compat_level) }; @@ -3411,6 +3412,7 @@ static int firmware_info(const char *input) printf("Version: %d.%d.%d\n", s->version_major, s->version_minor, s->version_patch); printf("Date: %02x%02x-%02x-%02x\n", s->year_hi, s->year_lo, s->month, s->day); + printf("Revision: %d\n", ntohl(s->rev)); } else { printf("Failed to parse data\n"); } |