Changeset b07c332 in mainline for kernel/generic/src/console/cmd.c


Ignore:
Timestamp:
2008-02-05T14:02:09Z (17 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
b5ed4f8
Parents:
a0f6a61
Message:

convert e820list to a generic physmem command

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/src/console/cmd.c

    ra0f6a61 rb07c332  
    335335};
    336336
     337/* Data and methods for 'physmem' command. */
     338static int cmd_physmem(cmd_arg_t *argv);
     339cmd_info_t physmem_info = {
     340        .name = "physmem",
     341        .description = "Print physical memory configuration.",
     342        .help = NULL,
     343        .func = cmd_physmem,
     344        .argc = 0,
     345        .argv = NULL
     346};
     347
    337348/* Data and methods for 'tlb' command. */
    338349static int cmd_tlb(cmd_arg_t *argv);
     
    458469        &threads_info,
    459470        &tasks_info,
     471        &physmem_info,
    460472        &tlb_info,
    461473        &version_info,
     
    485497void cmd_init(void)
    486498{
    487         int i;
    488 
    489         for (i=0;basic_commands[i]; i++) {
     499        unsigned int i;
     500
     501        for (i = 0; basic_commands[i]; i++) {
    490502                cmd_initialize(basic_commands[i]);
    491503                if (!cmd_register(basic_commands[i]))
    492                         panic("could not register command %s\n",
    493                               basic_commands[i]->name);
     504                        panic("could not register command %s\n", basic_commands[i]->name);
    494505        }
    495506}
     
    810821}
    811822
     823/** Command for printing physical memory configuration.
     824 *
     825 * @param argv Not used.
     826 *
     827 * @return Always returns 1.
     828 */
     829int cmd_physmem(cmd_arg_t *argv)
     830{
     831        physmem_print();
     832        return 1;
     833}
     834
    812835/** Write 4 byte value to address */
    813836int cmd_set4(cmd_arg_t *argv)
Note: See TracChangeset for help on using the changeset viewer.