From 2047f1f2abda04e86af1ba32826b872794106d18 Mon Sep 17 00:00:00 2001 From: Tomi Valkeinen Date: Tue, 28 Aug 2018 10:31:53 +0300 Subject: kmsprint: use connector_status Signed-off-by: Tomi Valkeinen --- utils/kmsprint.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/utils/kmsprint.cpp b/utils/kmsprint.cpp index c751ac9..19cf8b7 100644 --- a/utils/kmsprint.cpp +++ b/utils/kmsprint.cpp @@ -68,10 +68,17 @@ static string format_connector(Connector& c) str = sformat("Connector %u (%u) %s", c.idx(), c.id(), c.fullname().c_str()); - if (c.connected()) + switch (c.connector_status()) { + case ConnectorStatus::Connected: str += " (connected)"; - else + break; + case ConnectorStatus::Disconnected: str += " (disconnected)"; + break; + default: + str += " (unknown)"; + break; + } return str; } -- cgit v1.2.3