Skip to content

Commit d9bf5aa

Browse files
committed
hell and memory management modules
1 parent e283f61 commit d9bf5aa

3 files changed

Lines changed: 7 additions & 5 deletions

File tree

include/shell.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ typedef struct {
77
} command_t;
88

99
void shell_init(void);
10-
void shell_on_input(void);
10+
void shell_on_input(int key);
1111

1212
#endif

src/mem/vm_space.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ int vm_space_clone_cow(process_t* parent, process_t* child) {
3232
for (uint32_t i = 0; i < parent->region_count; ++i) {
3333
vm_region_t region = parent->regions[i];
3434
uint32_t size = region.end - region.start;
35+
(void)size;
3536
if (region.flags & VM_SHARED) {
3637
if (!vm_map_shared(child, region.shared_id, region.start)) {
3738
return 0;

src/shell/shell.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ static char cmd_diag_name[] = "diag";
6969
static char cmd_acpi_name[] = "acpi";
7070
static char cmd_cpuinfo_name[] = "cpuinfo";
7171

72+
static void shell_redraw_line(void);
7273
static void shell_putc(char ch);
7374
static void shell_write(const char* str);
7475
static void shell_prompt(void);
@@ -1435,9 +1436,9 @@ void shell_init(void) {
14351436
shell_prompt();
14361437
}
14371438

1438-
void shell_on_input(void) {
1439-
char ch;
1440-
while (keyboard_read_char(&ch)) {
1439+
void shell_on_input(int key) {
1440+
int ch = key;
1441+
{
14411442
if (ch == 12) {
14421443
fb_clear(0);
14431444
fb_console_init(0xFFFFFF, 0);
@@ -1583,7 +1584,7 @@ void shell_on_input(void) {
15831584
for (uint32_t i = line_length; i > cursor_pos; --i) {
15841585
line_buffer[i] = line_buffer[i - 1];
15851586
}
1586-
line_buffer[cursor_pos] = ch;
1587+
line_buffer[cursor_pos] = (char)ch;
15871588
line_length++;
15881589
cursor_pos++;
15891590
shell_redraw_line();

0 commit comments

Comments
 (0)