Move string.[ch] to lib/.
This commit is contained in:
parent
507d47f0b7
commit
b0c53f6c83
@ -1,5 +1,5 @@
|
|||||||
#include "port.h"
|
#include "port.h"
|
||||||
#include "../string.h"
|
#include "../lib/string.h"
|
||||||
|
|
||||||
static char* const video_memory = (char*) 0xb8000;
|
static char* const video_memory = (char*) 0xb8000;
|
||||||
|
|
||||||
|
|||||||
2
fs/fs.c
2
fs/fs.c
@ -1,5 +1,5 @@
|
|||||||
#include "fs.h"
|
#include "fs.h"
|
||||||
#include "../string.h"
|
#include "../lib/string.h"
|
||||||
#include "../drivers/ata.h"
|
#include "../drivers/ata.h"
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
|
|||||||
8
kernel.c
8
kernel.c
@ -1,4 +1,4 @@
|
|||||||
asm(".asciz \"kernel start\"");
|
asm(".asciz \"kernel start\\n\"");
|
||||||
|
|
||||||
#include "console.h"
|
#include "console.h"
|
||||||
#include "cpu/isr.h"
|
#include "cpu/isr.h"
|
||||||
@ -9,7 +9,7 @@ asm(".asciz \"kernel start\"");
|
|||||||
#include "drivers/misc.h"
|
#include "drivers/misc.h"
|
||||||
#include "drivers/uart.h"
|
#include "drivers/uart.h"
|
||||||
#include "fs/fs.h"
|
#include "fs/fs.h"
|
||||||
#include "string.h"
|
#include "lib/string.h"
|
||||||
|
|
||||||
void _start() {
|
void _start() {
|
||||||
load_gdt();
|
load_gdt();
|
||||||
@ -34,6 +34,10 @@ void _start() {
|
|||||||
if (kbd_buf_size > 0 && kbd_buf[kbd_buf_size-1] == '\n') {
|
if (kbd_buf_size > 0 && kbd_buf[kbd_buf_size-1] == '\n') {
|
||||||
if (!strncmp("halt\n", kbd_buf, kbd_buf_size)) {
|
if (!strncmp("halt\n", kbd_buf, kbd_buf_size)) {
|
||||||
qemu_shutdown();
|
qemu_shutdown();
|
||||||
|
} else if (!strncmp("run ", kbd_buf, kbd_buf_size)) {
|
||||||
|
kbd_buf[kbd_buf_size-1] = '\0';
|
||||||
|
// const char* cmd = kbd_buf + 4;
|
||||||
|
// run_elf(cmd);
|
||||||
} else {
|
} else {
|
||||||
printk("unknown command, try: halt\n> ");
|
printk("unknown command, try: halt\n> ");
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user