diff options
Diffstat (limited to 'mpm/tools/db-id.c')
-rw-r--r-- | mpm/tools/db-id.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/mpm/tools/db-id.c b/mpm/tools/db-id.c index 53501e0df..87c06392b 100644 --- a/mpm/tools/db-id.c +++ b/mpm/tools/db-id.c @@ -10,10 +10,17 @@ static void usrp_sulfur_db_eeprom_print_id(struct usrp_sulfur_db_eeprom *ep) { + int rev; + + if (ntohl(ep->version) == 1) + rev = ntohs(ep->rev.v1_rev); + else + rev = ep->rev.v2_rev.rev; + if (ntohs(ep->pid) == 0x150) - printf("product=ni,magnesium-rev%x\n", ntohs(ep->rev)+1); + printf("product=ni,magnesium-rev%x\n", rev + 1); else if (ntohs(ep->pid) == 0x180) - printf("product=ni,eiscat-rev%x\n", ntohs(ep->rev)+1); + printf("product=ni,eiscat-rev%x\n", rev + 1); else printf("product=unknown-(%04x)\n", ep->pid); |