view src/shell.c @ 98:28c230f0700e

Started very early work on the shell, fnameCmp will now return 0 if a null character is reached in one of the strings at the same location as a space in the other
author Jonathan Pevarnek <>
date Sat, 14 May 2011 17:12:12 -0400
children 2a0aa3efc228
line wrap: on
line source

#include <std.h>
#include <error.h>
#include <fs.h>
#include <die.h>

#define LIST 0
#define RUN 1

void start(u64 __memsize)
	if(isError(init_fs(0x100, __memsize))) die();
	char buffer[1024];
	while(1) {
		sPrint("> ");
		sGet(buffer, 78);
		u32 progID;
		if(isError(lookupFile(buffer, &progID))) {
			sPrint("ERROR: command not found\n");
		} else {
			sPrint("THE COMMAND WAS FOUND!!!  YAY!!!\n");