Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 3192 → Rev 3193

/trunk/kernel/generic/src/main/main.c
61,6 → 61,7
#include <main/kinit.h>
#include <main/version.h>
#include <console/kconsole.h>
#include <console/console.h>
#include <cpu.h>
#include <align.h>
#include <interrupt.h>
80,8 → 81,8
#include <adt/btree.h>
#include <smp/smp.h>
#include <ddi/ddi.h>
#include <console/console.h>
 
 
/** Global configuration structure. */
config_t config;
 
235,8 → 236,8
/* Slab must be initialized after we know the number of processors. */
LOG_EXEC(slab_enable_cpucache());
printf("Detected %" PRIc " CPU(s), %" PRIu64" MB free memory\n",
config.cpu_count, SIZE2MB(zone_total_size()));
printf("Detected %" PRIc " CPU(s), %" PRIu64" MiB free memory\n",
config.cpu_count, SIZE2MB(zone_total_size()));
LOG_EXEC(cpu_init());
252,8 → 253,8
count_t i;
for (i = 0; i < init.cnt; i++)
printf("init[%" PRIc "].addr=%#" PRIp ", init[%" PRIc
"].size=%#" PRIs "\n", i, init.tasks[i].addr,
i, init.tasks[i].size);
"].size=%#" PRIs "\n", i, init.tasks[i].addr, i,
init.tasks[i].size);
} else
printf("No init binaries found\n");
/trunk/kernel/generic/src/console/kconsole.c
169,7 → 169,7
}
 
/** Try to find a command beginning with prefix */
static const char * cmdtab_search_one(const char *name,link_t **startpos)
static const char *cmdtab_search_one(const char *name,link_t **startpos)
{
size_t namelen = strlen(name);
const char *curname;
203,7 → 203,7
*/
static int cmdtab_compl(char *name)
{
static char output[MAX_SYMBOL_NAME+1];
static char output[MAX_SYMBOL_NAME + 1];
link_t *startpos = NULL;
const char *foundtxt;
int found = 0;
213,7 → 213,7
while ((foundtxt = cmdtab_search_one(name, &startpos))) {
startpos = startpos->next;
if (!found)
strncpy(output, foundtxt, strlen(foundtxt)+1);
strncpy(output, foundtxt, strlen(foundtxt) + 1);
else {
for (i = 0; output[i] && foundtxt[i] &&
output[i] == foundtxt[i]; i++)
240,11 → 240,12
}
 
static char * clever_readline(const char *prompt, chardev_t *input)
//char *clever_readline(const char *prompt, chardev_t *input);
static char *clever_readline(const char *prompt, chardev_t *input)
{
static int histposition = 0;
 
static char tmp[MAX_CMDLINE+1];
static char tmp[MAX_CMDLINE + 1];
int curlen = 0, position = 0;
char *current = history[histposition];
int i;
257,7 → 258,8
if (c == '\n') {
putchar(c);
break;
} if (c == '\b') { /* Backspace */
}
if (c == '\b') { /* Backspace */
if (position == 0)
continue;
for (i = position; i < curlen; i++)
543,7 → 545,8
buf = (char *) cmd->argv[i].buffer;
strncpy(buf, (const char *) &cmdline[start],
min((end - start) + 2, cmd->argv[i].len));
buf[min((end - start) + 1, cmd->argv[i].len - 1)] = '\0';
buf[min((end - start) + 1, cmd->argv[i].len - 1)] =
'\0';
break;
case ARG_TYPE_INT:
if (parse_int_arg(cmdline + start, end - start + 1,
560,8 → 563,8
'\0';
cmd->argv[i].intval = (unative_t) buf;
cmd->argv[i].vartype = ARG_TYPE_STRING;
} else if (!parse_int_arg(cmdline + start, end - start + 1,
&cmd->argv[i].intval)) {
} else if (!parse_int_arg(cmdline + start,
end - start + 1, &cmd->argv[i].intval)) {
cmd->argv[i].vartype = ARG_TYPE_INT;
} else {
printf("Unrecognized variable argument.\n");