aboutsummaryrefslogtreecommitdiffstats
path: root/edid-decode.cpp
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil-cisco@xs4all.nl>2021-03-12 07:53:13 +0100
committerHans Verkuil <hverkuil-cisco@xs4all.nl>2021-03-12 07:53:13 +0100
commit0edd198d8b608b396f7716d56f21e8d6342f4481 (patch)
tree3a2484483907b1a3648914b813b2dfa4a8e03d0b /edid-decode.cpp
parent016c260859d48258a5701d2964fe01a167b749fc (diff)
edid-decode: introduce containerid2s()
Format the container IDs consistently. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Diffstat (limited to 'edid-decode.cpp')
-rw-r--r--edid-decode.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/edid-decode.cpp b/edid-decode.cpp
index 78119ae..78398d0 100644
--- a/edid-decode.cpp
+++ b/edid-decode.cpp
@@ -586,6 +586,19 @@ bool edid_state::print_timings(const char *prefix, const struct timings *t,
return ok;
}
+std::string containerid2s(const unsigned char *x)
+{
+ char buf[40];
+
+ sprintf(buf, "%02x%02x%02x%02x-%02x%02x-%02x%02x-%02x%02x-%02x%02x%02x%02x%02x%02x",
+ x[0], x[1], x[2], x[3],
+ x[4], x[5],
+ x[6], x[7],
+ x[8], x[9],
+ x[10], x[11], x[12], x[13], x[14], x[15]);
+ return buf;
+}
+
std::string utohex(unsigned char x)
{
char buf[10];

Privacy Policy