Changeset a35b458 in mainline for boot/arch/ia64/src/main.c


Ignore:
Timestamp:
2018-03-02T20:10:49Z (7 years ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
f1380b7
Parents:
3061bc1
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2018-02-28 17:38:31)
git-committer:
Jiří Zárevúcky <zarevucky.jiri@…> (2018-03-02 20:10:49)
Message:

style: Remove trailing whitespace on _all_ lines, including empty ones, for particular file types.

Command used: tools/srepl '\s\+$' '' -- *.c *.h *.py *.sh *.s *.S *.ag

Currently, whitespace on empty lines is very inconsistent.
There are two basic choices: Either remove the whitespace, or keep empty lines
indented to the level of surrounding code. The former is AFAICT more common,
and also much easier to do automatically.

Alternatively, we could write script for automatic indentation, and use that
instead. However, if such a script exists, it's possible to use the indented
style locally, by having the editor apply relevant conversions on load/save,
without affecting remote repository. IMO, it makes more sense to adopt
the simpler rule.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • boot/arch/ia64/src/main.c

    r3061bc1 ra35b458  
    6767        memmap_item_t *memmap = bootinfo.memmap;
    6868        size_t items = 0;
    69        
     69
    7070        if (!bootpar) {
    7171                /* Fake-up a memory map for simulators. */
     
    8383                size_t mm_size = bootpar->efi_memmap_sz;
    8484                size_t md_size = bootpar->efi_memdesc_sz;
    85                
     85
    8686                /*
    8787                 * Walk the EFI memory map using the V1 memory descriptor
     
    109109                                continue;
    110110                        }
    111                        
     111
    112112                        memmap[items].base = md->phys_start;
    113113                        memmap[items].size = md->pages * EFI_PAGE_SIZE;
     
    115115                }
    116116        }
    117        
     117
    118118        bootinfo.memmap_items = items;
    119119}
     
    134134                efi_guid_t sal_guid = SAL_SYSTEM_TABLE_GUID;
    135135                sal_system_table_header_t *sal_st;
    136                
     136
    137137                sal_st = efi_vendor_table_find(
    138138                    (efi_system_table_t *) bootpar->efi_system_table, sal_guid);
    139139
    140140                sal_system_table_parse(sal_st);
    141                
     141
    142142                bootinfo.sys_freq = sal_base_clock_frequency();
    143143        } else {
     
    150150{
    151151        version_print();
    152        
     152
    153153        printf(" %p|%p: boot info structure\n", &bootinfo, &bootinfo);
    154154        printf(" %p|%p: kernel entry point\n",
     
    156156        printf(" %p|%p: loader entry point\n",
    157157            (void *) LOADER_ADDRESS, (void *) LOADER_ADDRESS);
    158        
     158
    159159        size_t i;
    160160        for (i = 0; i < COMPONENTS; i++)
     
    162162                    components[i].addr, components[i].name,
    163163                    components[i].inflated, components[i].size);
    164        
     164
    165165        void *dest[COMPONENTS];
    166166        size_t top = KERNEL_ADDRESS;
     
    169169        for (i = 0; i < min(COMPONENTS, TASKMAP_MAX_RECORDS); i++) {
    170170                top = ALIGN_UP(top, PAGE_SIZE);
    171                
     171
    172172                if (i > 0) {
    173173                        bootinfo.taskmap.tasks[bootinfo.taskmap.cnt].addr =
     
    175175                        bootinfo.taskmap.tasks[bootinfo.taskmap.cnt].size =
    176176                            components[i].inflated;
    177                        
     177
    178178                        str_cpy(bootinfo.taskmap.tasks[bootinfo.taskmap.cnt].name,
    179179                            BOOTINFO_TASK_NAME_BUFLEN, components[i].name);
    180                        
     180
    181181                        bootinfo.taskmap.cnt++;
    182182                }
    183                
     183
    184184                dest[i] = (void *) top;
    185185                top += components[i].inflated;
    186186                cnt++;
    187187        }
    188        
     188
    189189        printf("\nInflating components ... ");
    190        
     190
    191191        /*
    192192         * We will use the next available address for a copy of each component to
     
    197197        for (i = cnt; i > 0; i--) {
    198198                printf("%s ", components[i - 1].name);
    199                
     199
    200200                /*
    201201                 * Copy the component to a location which is guaranteed not to
     
    203203                 */
    204204                memmove((void *) top, components[i - 1].addr, components[i - 1].size);
    205                
     205
    206206                int err = inflate((void *) top, components[i - 1].size,
    207207                    dest[i - 1], components[i - 1].inflated);
    208                
     208
    209209                if (err != EOK) {
    210210                        printf("\n%s: Inflating error %d, halting.\n",
     
    213213                }
    214214        }
    215        
     215
    216216        printf(".\n");
    217217
     
    219219        read_sal_configuration();
    220220        read_pal_configuration();
    221        
     221
    222222        printf("Booting the kernel ...\n");
    223223        jump_to_kernel(&bootinfo);
Note: See TracChangeset for help on using the changeset viewer.