From 5441b096563649b629b653f619e7d87d8cbcfe9c Mon Sep 17 00:00:00 2001 From: Olivier FAURAX Date: Thu, 7 Nov 2024 15:25:11 +0000 Subject: [PATCH] Version is in 3rd byte Signed-off-by: Olivier FAURAX --- packethardware/utils.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packethardware/utils.py b/packethardware/utils.py index 23c7c6a..2a02746 100644 --- a/packethardware/utils.py +++ b/packethardware/utils.py @@ -536,11 +536,12 @@ def get_mc_info(prop): # Dell version encoding # Their version is A.B.C.D, but we only report A.B.C as D is always 0 # aux: "0x00 0x1e 0x1e 0x00" -> ".30", not ".30.00" + # also "0x00 0x05 0x00 0xab" should be seen as ".00.171" -> ".00" if normalize_vendor(get_mc_info("vendor")) == "Dell Inc.": return ( __re_multiline_first(mc_info, regex[prop]).strip() + "." - + str(int(get_mc_info("aux")[5:9], 16)) + + str(int(get_mc_info("aux")[10:14], 16)) ) # firmware_version provides X.Y, aux 1st byte provides .Z