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-disk.c

    re9069c rdff898  
    6363        int i = nb_partitions_seen; 
    6464 
     65    reset_more_printf(); 
     66 
    6567        start = partition_offset; 
    6668        end = start + ptab->length - 1; 
     
    115117 
    116118        detect_disks(hardware); 
     119    reset_more_printf(); 
     120 
    117121        if (!hardware->disk_info[i].cbios) 
    118122                return; /* Invalid geometry */ 
     
    158162        detect_disks(hardware); 
    159163 
    160         int first_one = 0; 
     164    int first_one = 0; 
    161165        for (int drive = 0x80; drive < 0xff; drive++) { 
    162166                if (hardware->disk_info[drive - 0x80].cbios) { 
    163                         if (!first_one) { 
    164                                 first_one = 1; 
    165                         } else { 
    166                                 pause_printf(); 
    167                         } 
     167            if (!first_one) { 
     168                    first_one = 1; 
     169            } else { 
     170                    pause_printf(); 
     171            } 
    168172                        char buf[5] = ""; 
    169173                        sprintf(buf, "0x%x", drive);