aboutsummaryrefslogtreecommitdiffstats
path: root/parse-ls-ext-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-ls-ext-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-ls-ext-block.cpp')
-rw-r--r--parse-ls-ext-block.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/parse-ls-ext-block.cpp b/parse-ls-ext-block.cpp
index e997744..1643f7d 100644
--- a/parse-ls-ext-block.cpp
+++ b/parse-ls-ext-block.cpp
@@ -15,7 +15,7 @@ static void parse_string(const char *name, const unsigned char *x)
hex_block("", x + 1, *x, true, *x);
}
-static void parse_string_table(const unsigned char *x)
+void edid_state::parse_string_table(const unsigned char *x)
{
printf(" UTF Type: ");
switch (x[0] & 7) {
@@ -46,7 +46,10 @@ static void parse_string_table(const unsigned char *x)
x += x[0] + 1;
parse_string("Model Name", x);
x += x[0] + 1;
- parse_string("Serial Number", x);
+ if (hide_serial_numbers)
+ printf(" Serial Number: ...\n");
+ else
+ parse_string("Serial Number", x);
}
void edid_state::parse_ls_ext_block(const unsigned char *x)

Privacy Policy