Changeset 80bff342 in mainline for generic/src/console/cmd.c


Ignore:
Timestamp:
2005-12-30T15:39:00Z (19 years ago)
Author:
Sergey Bondari <bondari@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
65fb232
Parents:
feb5915
Message:

Zones related commands infrastructure for console. Also fixed small bug that caused infinite loop during command parsing

File:
1 edited

Legend:

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

    rfeb5915 r80bff342  
    4949#include <mm/tlb.h>
    5050#include <arch/mm/tlb.h>
     51#include <mm/frame.h>
    5152
    5253/** Data and methods for 'help' command. */
     
    118119        .argv = set4_argv
    119120};
     121
    120122
    121123
     
    242244};
    243245
     246
     247/** Data and methods for 'zones' command */
     248static int cmd_zones(cmd_arg_t *argv);
     249static cmd_info_t zones_info = {
     250        .name = "zones",
     251        .description = "List of memory zones.",
     252        .func = cmd_zones,
     253        .argc = 0
     254};
     255
     256/** Data and methods for 'zone' command */
     257static int cmd_zone(cmd_arg_t *argv);
     258static char zone_buf[MAX_CMDLINE+1];
     259static cmd_arg_t zone_argv = {
     260        .type = ARG_TYPE_INT,
     261        .buffer = zone_buf,
     262        .len = sizeof(zone_buf)
     263};
     264
     265
     266static cmd_info_t zone_info = {
     267        .name = "zone",
     268        .description = "Show memory zone structure.",
     269        .func = cmd_zone,
     270        .argc = 1,
     271        .argv = &zone_argv
     272};
     273
     274
     275
    244276/** Initialize command info structure.
    245277 *
     
    299331        if (!cmd_register(&ptlb_info))
    300332                panic("could not register command %s\n", ptlb_info.name);
     333
     334        cmd_initialize(&zones_info);
     335        if (!cmd_register(&zones_info))
     336                panic("could not register command %s\n", zones_info.name);
     337
     338        cmd_initialize(&zone_info);
     339        if (!cmd_register(&zone_info))
     340                panic("could not register command %s\n", zone_info.name);
     341
     342
    301343}
    302344
     
    534576        return 1;
    535577}
     578
     579
     580int cmd_zones(cmd_arg_t * argv) {
     581        printf("Zones listing not implemented\n");
     582        return 1;
     583}
     584int cmd_zone(cmd_arg_t * argv) {
     585        printf("Zone details not implemented\n");
     586        return 1;
     587}
     588
Note: See TracChangeset for help on using the changeset viewer.