This is an automatic generated email to let you know that the following patch 
were queued:

Subject: edid-decode: show Serial Number also in hex
Author:  Hans Verkuil <hverkuil-ci...@xs4all.nl>
Date:    Thu Nov 2 11:49:34 2023 +0100

In decimal only it is hard to detect that 16843009
is actually a typical dummy serial number value. Showing this
in hex (0x01010101) suddenly makes it clear that this
S/N is not reliable.

Signed-off-by: Hans Verkuil <hverkuil-ci...@xs4all.nl>

 parse-base-block.cpp | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

---

diff --git a/parse-base-block.cpp b/parse-base-block.cpp
index c39e672027ce..9395bb0ff423 100644
--- a/parse-base-block.cpp
+++ b/parse-base-block.cpp
@@ -1386,12 +1386,13 @@ void edid_state::parse_base_block(const unsigned char 
*x)
               manufacturer_name(x + 0x08),
               (unsigned short)(x[0x0a] + (x[0x0b] << 8)));
        if (base.has_serial_number) {
+               unsigned sn = x[0x0c] + (x[0x0d] << 8) +
+                       (x[0x0e] << 16) + (x[0x0f] << 24);
+
                if (hide_serial_numbers)
                        printf("    Serial Number: ...\n");
                else
-                       printf("    Serial Number: %u\n",
-                              (unsigned)(x[0x0c] + (x[0x0d] << 8) +
-                                         (x[0x0e] << 16) + (x[0x0f] << 24)));
+                       printf("    Serial Number: %u (0x%08x)\n", sn, sn);
        }
 
        time(&the_time);

_______________________________________________
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
https://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits

Reply via email to