Changeset c70d693 in mainline


Ignore:
Timestamp:
2008-06-03T14:44:48Z (16 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
0f269c2
Parents:
9fe962d6
Message:

proper printf formatting

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/src/interrupt/interrupt.c

    r9fe962d6 rc70d693  
    109109
    110110        spinlock_lock(&exctbl_lock);
    111        
    112         if (sizeof(void *) == 4) {
    113                 printf("Exc Description          Handler    Symbol\n");
    114                 printf("--- -------------------- ---------- --------\n");
    115         } else {
    116                 printf("Exc Description          Handler            Symbol\n");
    117                 printf("--- -------------------- ------------------ --------\n");
    118         }
     111
     112#ifdef __32_BITS__
     113        printf("Exc Description          Handler    Symbol\n");
     114        printf("--- -------------------- ---------- --------\n");
     115#endif
     116
     117#ifdef __64_BITS__
     118        printf("Exc Description          Handler            Symbol\n");
     119        printf("--- -------------------- ------------------ --------\n");
     120#endif
    119121       
    120122        for (i = 0; i < IVT_ITEMS; i++) {
     
    122124                if (!symbol)
    123125                        symbol = "not found";
    124                
    125                 if (sizeof(void *) == 4)
    126                         printf("%-3u %-20s %#10zx %s\n", i + IVT_FIRST, exc_table[i].name,
    127                                 exc_table[i].f, symbol);
    128                 else
    129                         printf("%-3u %-20s %#18zx %s\n", i + IVT_FIRST, exc_table[i].name,
    130                                 exc_table[i].f, symbol);
     126
     127#ifdef __32_BITS__
     128                printf("%-3u %-20s %10p %s\n", i + IVT_FIRST, exc_table[i].name,
     129                        exc_table[i].f, symbol);
     130#endif
     131
     132#ifdef __64_BITS__
     133                printf("%-3u %-20s %18p %s\n", i + IVT_FIRST, exc_table[i].name,
     134                        exc_table[i].f, symbol);
     135#endif
    131136               
    132137                if (((i + 1) % 20) == 0) {
     
    159164        int i;
    160165
    161         for (i=0;i < IVT_ITEMS; i++)
     166        for (i = 0; i < IVT_ITEMS; i++)
    162167                exc_register(i, "undef", (iroutine) exc_undef);
    163168
Note: See TracChangeset for help on using the changeset viewer.