Changeset 272c219 in mainline for arch/ppc32/loader/printf.c


Ignore:
Timestamp:
2006-03-13T18:42:58Z (19 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
eebd172
Parents:
8cbe350
Message:

cleanup and extend OFW code

File:
1 edited

Legend:

Unmodified
Added
Removed
  • arch/ppc32/loader/printf.c

    r8cbe350 r272c219  
    3333
    3434
     35void puts(const char *str)
     36{
     37        int len = 0;
     38       
     39        while (str[len] != 0)
     40                len++;
     41       
     42        ofw_write(str, len);
     43}
     44
     45
    3546/** Print hexadecimal digits
    3647 *
     
    7485       
    7586        d[sizeof(__native) * 8] = 0;   
    76         ofw_puts(&d[i + 1]);
     87        puts(&d[i + 1]);
    7788}
    7889
     
    157168                                         */
    158169                                        case 's':
    159                                                 ofw_puts(va_arg(ap, char_ptr));
     170                                                puts(va_arg(ap, char_ptr));
    160171                                                goto loop;
    161172                                       
     
    168179                                         */
    169180                                        case 'P':
    170                                                 ofw_puts("0x");
     181                                                puts("0x");
    171182                                        case 'p':
    172183                                                print_fixed_hex(va_arg(ap, __native), sizeof(__native));
     
    174185                                       
    175186                                        case 'Q':
    176                                                 ofw_puts("0x");
     187                                                puts("0x");
    177188                                        case 'q':
    178189                                                print_fixed_hex(va_arg(ap, __u64), INT64);
     
    180191                                       
    181192                                        case 'L':
    182                                                 ofw_puts("0x");
     193                                                puts("0x");
    183194                                        case 'l':
    184195                                                print_fixed_hex(va_arg(ap, __native), INT32);
     
    186197                                       
    187198                                        case 'W':
    188                                                 ofw_puts("0x");
     199                                                puts("0x");
    189200                                        case 'w':
    190201                                                print_fixed_hex(va_arg(ap, __native), INT16);
     
    192203                                       
    193204                                        case 'B':
    194                                                 ofw_puts("0x");
     205                                                puts("0x");
    195206                                        case 'b':
    196207                                                print_fixed_hex(va_arg(ap, __native), INT8);
     
    205216                                       
    206217                                        case 'X':
    207                                                 ofw_puts("0x");
     218                                                puts("0x");
    208219                                        case 'x':
    209220                                                print_number(va_arg(ap, __native), 16);
Note: See TracChangeset for help on using the changeset viewer.