Changeset 5d67baa in mainline for kernel/generic/src


Ignore:
Timestamp:
2008-06-30T20:33:18Z (17 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
939e9c1
Parents:
ac0e791
Message:

cstyle fixes

Location:
kernel/generic/src
Files:
2 edited

Legend:

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

    rac0e791 r5d67baa  
    170170
    171171/** Try to find a command beginning with prefix */
    172 static const char * cmdtab_search_one(const char *name,link_t **startpos)
     172static const char *cmdtab_search_one(const char *name,link_t **startpos)
    173173{
    174174        size_t namelen = strlen(name);
     
    204204static int cmdtab_compl(char *name)
    205205{
    206         static char output[MAX_SYMBOL_NAME+1];
     206        static char output[MAX_SYMBOL_NAME + 1];
    207207        link_t *startpos = NULL;
    208208        const char *foundtxt;
     
    214214                startpos = startpos->next;
    215215                if (!found)
    216                         strncpy(output, foundtxt, strlen(foundtxt)+1);
     216                        strncpy(output, foundtxt, strlen(foundtxt) + 1);
    217217                else {
    218218                        for (i = 0; output[i] && foundtxt[i] &&
     
    241241}
    242242
    243 static char * clever_readline(const char *prompt, chardev_t *input)
     243//char *clever_readline(const char *prompt, chardev_t *input);
     244static char *clever_readline(const char *prompt, chardev_t *input)
    244245{
    245246        static int histposition = 0;
    246247
    247         static char tmp[MAX_CMDLINE+1];
     248        static char tmp[MAX_CMDLINE + 1];
    248249        int curlen = 0, position = 0;
    249250        char *current = history[histposition];
     
    258259                        putchar(c);
    259260                        break;
    260                 } if (c == '\b') { /* Backspace */
     261                }
     262                if (c == '\b') { /* Backspace */
    261263                        if (position == 0)
    262264                                continue;
     
    544546                        strncpy(buf, (const char *) &cmdline[start],
    545547                            min((end - start) + 2, cmd->argv[i].len));
    546                         buf[min((end - start) + 1, cmd->argv[i].len - 1)] = '\0';
     548                        buf[min((end - start) + 1, cmd->argv[i].len - 1)] =
     549                            '\0';
    547550                        break;
    548551                case ARG_TYPE_INT:
     
    561564                                cmd->argv[i].intval = (unative_t) buf;
    562565                                cmd->argv[i].vartype = ARG_TYPE_STRING;
    563                         } else if (!parse_int_arg(cmdline + start, end - start + 1,
    564                             &cmd->argv[i].intval)) {
     566                        } else if (!parse_int_arg(cmdline + start,
     567                            end - start + 1, &cmd->argv[i].intval)) {
    565568                                cmd->argv[i].vartype = ARG_TYPE_INT;
    566569                        } else {
  • kernel/generic/src/main/main.c

    rac0e791 r5d67baa  
    6262#include <main/version.h>
    6363#include <console/kconsole.h>
     64#include <console/console.h>
    6465#include <cpu.h>
    6566#include <align.h>
     
    8182#include <smp/smp.h>
    8283#include <ddi/ddi.h>
    83 #include <console/console.h>
     84
    8485
    8586/** Global configuration structure. */
     
    236237        LOG_EXEC(slab_enable_cpucache());
    237238       
    238         printf("Detected %" PRIc " CPU(s), %" PRIu64" MB free memory\n",
    239                 config.cpu_count, SIZE2MB(zone_total_size()));
     239        printf("Detected %" PRIc " CPU(s), %" PRIu64" MiB free memory\n",
     240            config.cpu_count, SIZE2MB(zone_total_size()));
    240241       
    241242        LOG_EXEC(cpu_init());
     
    253254                for (i = 0; i < init.cnt; i++)
    254255                        printf("init[%" PRIc "].addr=%#" PRIp ", init[%" PRIc
    255                             "].size=%#" PRIs "\n", i, init.tasks[i].addr,
    256                             i, init.tasks[i].size);
     256                            "].size=%#" PRIs "\n", i, init.tasks[i].addr, i,
     257                            init.tasks[i].size);
    257258        } else
    258259                printf("No init binaries found\n");
Note: See TracChangeset for help on using the changeset viewer.