Use this to get a nice human readable name
when available (also including the session id in
parentheses)
Signed-off-by: John Spray <john.spray@redhat.com>
(cherry picked from commit
0f89787d8312f132ebb621f16c44e950b17a395a)
return true;
}
+std::ostream& operator<<(std::ostream &out, const Session &s)
+{
+ if (s.get_human_name() == stringify(s.info.inst.name.num())) {
+ out << s.get_human_name();
+ } else {
+ out << s.get_human_name() << " (" << std::dec << s.info.inst.name.num() << ")";
+ }
+ return out;
+}
+
MDSGatherBuilder *gather_bld);
};
+std::ostream& operator<<(std::ostream &out, const Session &s);
+
#endif