aboutsummaryrefslogtreecommitdiffstats
path: root/parse-displayid-block.cpp
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil-cisco@xs4all.nl>2020-11-21 14:29:55 +0100
committerHans Verkuil <hverkuil-cisco@xs4all.nl>2020-11-21 14:29:55 +0100
commit474485f5aca6117531b908e79e31ca6dac6ec320 (patch)
treea4de1be59e8e2592b7a93206146059fa1a266881 /parse-displayid-block.cpp
parent45190a18df36a4294279aa79a6a928a51afa2046 (diff)
edid-decode: add --hide-serial-numbers option
If this option is used, then all serial numbers in the human readable output are placed by ... Note that they can still be extracted via the hex dump at the start, but at least it is not easily readable anymore. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Diffstat (limited to 'parse-displayid-block.cpp')
-rw-r--r--parse-displayid-block.cpp17
1 files changed, 12 insertions, 5 deletions
diff --git a/parse-displayid-block.cpp b/parse-displayid-block.cpp
index ad873a3..545f948 100644
--- a/parse-displayid-block.cpp
+++ b/parse-displayid-block.cpp
@@ -89,8 +89,12 @@ void edid_state::parse_displayid_product_id(const unsigned char *x)
}
printf(" Product Code: %u\n", x[6] | (x[7] << 8));
unsigned sn = x[8] | (x[9] << 8) | (x[10] << 16) | (x[11] << 24);
- if (sn)
- printf(" Serial Number: %u\n", sn);
+ if (sn) {
+ if (hide_serial_numbers)
+ printf(" Serial Number: ...\n");
+ else
+ printf(" Serial Number: %u\n", sn);
+ }
unsigned week = x[12];
unsigned year = 2000 + x[13];
printf(" %s: %u",
@@ -899,7 +903,7 @@ void edid_state::parse_displayid_type_5_timing(const unsigned char *x)
// tag 0x12 and 0x28
-static void parse_displayid_tiled_display_topology(const unsigned char *x, bool is_v2)
+void edid_state::parse_displayid_tiled_display_topology(const unsigned char *x, bool is_v2)
{
check_displayid_datablock_revision(x);
@@ -963,8 +967,11 @@ static void parse_displayid_tiled_display_topology(const unsigned char *x, bool
x[0x10], x[0x11], x[0x12]);
printf(" Tiled Display Product ID Code: %u\n",
x[0x13] | (x[0x14] << 8));
- printf(" Tiled Display Serial Number: %u\n",
- x[0x15] | (x[0x16] << 8) | (x[0x17] << 16)| (x[0x18] << 24));
+ if (hide_serial_numbers)
+ printf(" Tiled Display Serial Number: ...\n");
+ else
+ printf(" Tiled Display Serial Number: %u\n",
+ x[0x15] | (x[0x16] << 8) | (x[0x17] << 16)| (x[0x18] << 24));
}
// tag 0x13

Privacy Policy