From dff89818c3b64eff6f31f04dcef240c5a9daff4c Mon Sep 17 00:00:00 2001 From: Pierre-Alexandre Meyer Date: Sat, 31 Oct 2009 22:32:26 -0700 Subject: hdt: change remaining printf to more_printf (CLI) A lot of places still had printf() instead of more_printf(). This patch does a bulk update and add missing reset_more_printf(), used to reset the pager counter between each command call. This also changes the more_printf() routine to delete the "--More--" line while scrolling. Signed-off-by: Pierre-Alexandre Meyer --- com32/hdt/hdt-cli-kernel.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'com32/hdt/hdt-cli-kernel.c') diff --git a/com32/hdt/hdt-cli-kernel.c b/com32/hdt/hdt-cli-kernel.c index 41c80bea..d33cdd80 100644 --- a/com32/hdt/hdt-cli-kernel.c +++ b/com32/hdt/hdt-cli-kernel.c @@ -46,6 +46,7 @@ void main_show_kernel(int argc __unused, char **argv __unused, memset(buffer, 0, sizeof(buffer)); detect_pci(hardware); + reset_more_printf(); more_printf("Kernel modules\n"); // more_printf(" PCI device no: %d \n", p->pci_device_pos); @@ -105,17 +106,18 @@ static void show_kernel_modules(int argc __unused, char **argv __unused, if (hardware->pci_ids_return_code == -ENOPCIIDS) { nopciids = true; - printf(" Missing pci.ids, we can't compute the list\n"); + more_printf(" Missing pci.ids, we can't compute the list\n"); return; } if (hardware->modules_pcimap_return_code == -ENOMODULESPCIMAP) { nomodulespcimap = true; - printf + more_printf (" Missing modules.pcimap, we can't compute the list\n"); return; } + reset_more_printf(); for_each_pci_func(pci_device, hardware->pci_domain) { memset(kernel_modules, 0, sizeof kernel_modules); @@ -140,7 +142,7 @@ static void show_kernel_modules(int argc __unused, char **argv __unused, /* Print the found items */ for (int i = 0; i < MAX_PCI_CLASSES; i++) { if (strlen(category_name[i]) > 1) { - printf("%s : %s\n", category_name[i], modules[i]); + more_printf("%s : %s\n", category_name[i], modules[i]); } } } -- cgit v1.2.1