diff options
author | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2016-08-11 12:47:34 +0300 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2016-09-23 14:46:55 +0300 |
commit | 8f5e937129d96081f0342aa4377b1ffd48f9ea75 (patch) | |
tree | 56374b2a0b8f4e527124cd769fee5aeb33801249 /utils | |
parent | 2fc74db3a222420b78c939d77eb9f354febcd57b (diff) |
kmsprint: improve property enum prints
Diffstat (limited to 'utils')
-rw-r--r-- | utils/kmsprint.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/utils/kmsprint.cpp b/utils/kmsprint.cpp index e6a4be4..7f02b41 100644 --- a/utils/kmsprint.cpp +++ b/utils/kmsprint.cpp @@ -138,10 +138,10 @@ static string format_property(const Property* prop, uint64_t val) for (auto kvp : prop->get_enums()) { if (val & (1 << kvp.first)) v.push_back(kvp.second); - vall.push_back(kvp.second); + vall.push_back(sformat("%s=0x%x", kvp.second.c_str(), 1 << kvp.first)); } - ret += sformat("%s (%s)", join(v, "|").c_str(), join(vall, "|").c_str()); + ret += sformat("0x%llx (%s) [%s]", val, join(v, "|").c_str(), join(vall, "|").c_str()); break; } @@ -170,10 +170,10 @@ static string format_property(const Property* prop, uint64_t val) for (auto kvp : prop->get_enums()) { if (val == kvp.first) cur = kvp.second; - vall.push_back(kvp.second); + vall.push_back(sformat("%s=%llu", kvp.second.c_str(), kvp.first)); } - ret += sformat("%s (%s)", cur.c_str(), join(vall, "|").c_str()); + ret += sformat("%llu (%s) [%s]", val, cur.c_str(), join(vall, "|").c_str()); break; } |