Show
Ignore:
Timestamp:
11/01/09 12:05:07 (3 years ago)
Author:
Erwan Velu <erwan.velu@…>
Children:
079f92a31281573b8a7b152b1730e7a349ac6365
Parents:
a7f6dd2b9fc3f8ad29a05135c99288156961329b
git-author:
Pierre-Alexandre Meyer <pierre@mouraf.org> / 2009-10-31T22:32:26Z-0700
git-committer:
Erwan Velu <erwan.velu@free.fr> / 2009-11-01T13:05:07Z+0100
Message:

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@…>

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • com32/hdt/hdt-cli-pxe.c

    ra9d9ad rdff898  
    4242        char buffer[81]; 
    4343        memset(buffer, 0, sizeof(81)); 
     44    reset_more_printf(); 
    4445        if (hardware->sv->filesystem != SYSLINUX_FS_PXELINUX) { 
    45                 printf("You are not currently using PXELINUX\n"); 
     46                more_printf("You are not currently using PXELINUX\n"); 
    4647                return; 
    4748        } 
    4849 
    4950        detect_pxe(hardware); 
    50         printf("PXE\n"); 
     51        more_printf("PXE\n"); 
    5152        if (hardware->is_pxe_valid == false) { 
    52                 printf(" No valid PXE ROM found\n"); 
     53                more_printf(" No valid PXE ROM found\n"); 
    5354                return; 
    5455        } 
    5556 
    5657        struct s_pxe *p = &hardware->pxe; 
    57         printf(" PCI device no: %d \n", p->pci_device_pos); 
     58        more_printf(" PCI device no: %d \n", p->pci_device_pos); 
    5859 
    5960        if (hardware->pci_ids_return_code == -ENOPCIIDS || 
     
    6667                         " PCI Bus pos. : %02x:%02x.%02x\n", p->pci_bus, 
    6768                         p->pci_dev, p->pci_func); 
    68                 printf(buffer); 
     69                more_printf(buffer); 
    6970        } else { 
    7071                snprintf(buffer, sizeof(buffer), " Manufacturer : %s \n", 
    7172                         p->pci_device->dev_info->vendor_name); 
    72                 printf(buffer); 
     73                more_printf(buffer); 
    7374                snprintf(buffer, sizeof(buffer), " Product      : %s \n", 
    7475                         p->pci_device->dev_info->product_name); 
    75                 printf(buffer); 
     76                more_printf(buffer); 
    7677        } 
    77         printf(" Addresses    : %d.%d.%d.%d @ %s\n", p->ip_addr[0], 
     78        more_printf(" Addresses    : %d.%d.%d.%d @ %s\n", p->ip_addr[0], 
    7879                    p->ip_addr[1], p->ip_addr[2], p->ip_addr[3], p->mac_addr); 
    7980}