summaryrefslogtreecommitdiff
path: root/com32/hdt/hdt-cli-kernel.c
diff options
context:
space:
mode:
authorPierre-Alexandre Meyer <pierre@mouraf.org>2009-10-31 22:32:26 -0700
committerErwan Velu <erwan.velu@free.fr>2009-11-01 13:05:07 +0100
commitdff89818c3b64eff6f31f04dcef240c5a9daff4c (patch)
treecec2c97c03c3f33c5ede9b4cb9d375e2f20a132e /com32/hdt/hdt-cli-kernel.c
parenta7f6dd2b9fc3f8ad29a05135c99288156961329b (diff)
downloadsyslinux-dff89818c3b64eff6f31f04dcef240c5a9daff4c.tar.gz
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 <pierre@mouraf.org>
Diffstat (limited to 'com32/hdt/hdt-cli-kernel.c')
-rw-r--r--com32/hdt/hdt-cli-kernel.c8
1 files changed, 5 insertions, 3 deletions
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]);
}
}
}