summaryrefslogtreecommitdiffstats
path: root/pcitool/cli.c
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@suren.me>2015-04-28 22:06:03 +0200
committerSuren A. Chilingaryan <csa@suren.me>2015-04-28 22:06:03 +0200
commit7ddaa80e4308b34253f30ed25b9e775810cdf115 (patch)
treefa434e89bbf8966b69f4a1ffd869930f83dc6488 /pcitool/cli.c
parent30c99c130dbf9d5bea342c16d5bdc4ae12e402f2 (diff)
downloadpcitool-7ddaa80e4308b34253f30ed25b9e775810cdf115.tar.gz
pcitool-7ddaa80e4308b34253f30ed25b9e775810cdf115.tar.bz2
pcitool-7ddaa80e4308b34253f30ed25b9e775810cdf115.tar.xz
pcitool-7ddaa80e4308b34253f30ed25b9e775810cdf115.zip
Better formatting of model output
Diffstat (limited to 'pcitool/cli.c')
-rw-r--r--pcitool/cli.c15
1 files changed, 7 insertions, 8 deletions
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");
}