[PATCH 2/2] media-ctl: Print media graph completes if available

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Make use of the flags filed in media_device_info and display the graphs
completes, if the information is available.

Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@xxxxxxxxxxxx>
---
 utils/media-ctl/media-ctl.c | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)

diff --git a/utils/media-ctl/media-ctl.c b/utils/media-ctl/media-ctl.c
index 6661b487d73ca7cd..5187258e0625eb56 100644
--- a/utils/media-ctl/media-ctl.c
+++ b/utils/media-ctl/media-ctl.c
@@ -563,6 +563,14 @@ int main(int argc, char **argv)
 
 	if (media_opts.print) {
 		const struct media_device_info *info = media_get_info(media);
+		const char *complete = "";
+
+		if (info->flags) {
+			if (info->flags & MEDIA_INFO_FLAG_INCOMPLETE)
+				complete = "graph status:   incomplete\n";
+			else if (info->flags & MEDIA_INFO_FLAG_COMPLETE)
+				complete = "graph status:   complete\n";
+		}
 
 		printf("Media controller API version %u.%u.%u\n\n",
 		       (info->media_version >> 16) & 0xff,
@@ -575,13 +583,16 @@ int main(int argc, char **argv)
 		       "serial          %s\n"
 		       "bus info        %s\n"
 		       "hw revision     0x%x\n"
-		       "driver version  %u.%u.%u\n\n",
+		       "driver version  %u.%u.%u\n"
+		       "%s\n",
 		       info->driver, info->model,
 		       info->serial, info->bus_info,
 		       info->hw_revision,
 		       (info->driver_version >> 16) & 0xff,
 		       (info->driver_version >> 8) & 0xff,
-		       (info->driver_version >> 0) & 0xff);
+		       (info->driver_version >> 0) & 0xff,
+		       complete);
+
 	}
 
 	if (media_opts.entity) {
-- 
2.25.0




[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux