From 7ddaa80e4308b34253f30ed25b9e775810cdf115 Mon Sep 17 00:00:00 2001 From: "Suren A. Chilingaryan" Date: Tue, 28 Apr 2015 22:06:03 +0200 Subject: Better formatting of model output --- pcitool/cli.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'pcitool/cli.c') diff --git a/pcitool/cli.c b/pcitool/cli.c index 77d754b..60beb3c 100644 --- a/pcitool/cli.c +++ b/pcitool/cli.c @@ -540,10 +540,9 @@ void Info(pcilib_t *handle, const pcilib_model_description_t *model_info) { if (plugin) { info = pcilib_get_plugin_model(handle, plugin, 0, 0, NULL); if (info) { - printf(" %s => ", entry->d_name); + printf(" %s\n", entry->d_name); for (j = 0; info[j].name; j++) - printf("%s ", info[j].name); - printf("\n"); + printf(" %-12s - %s\n", info[j].name, info[j].description?info[j].description:""); } pcilib_plugin_close(plugin); } else { @@ -555,12 +554,12 @@ void Info(pcilib_t *handle, const pcilib_model_description_t *model_info) { closedir(dir); } - printf(" DMA => "); +// printf(" XML\n"); + + printf(" Internal Models\n"); for (i = 0; pcilib_dma[i].api; i++) - printf("%s ", pcilib_dma[i].name); - printf("\n"); - printf(" XML =>\n"); - printf(" Plain => pci\n\n"); + printf(" %-12s - %s\n", pcilib_dma[i].name, pcilib_dma[i].description?pcilib_dma[i].description:""); + printf(" %-12s - Plain PCI-access model\n\n", "pci"); } -- cgit v1.2.3