summaryrefslogtreecommitdiff
path: root/kernel/user.c
diff options
context:
space:
mode:
authorFreya Murphy <freya@freyacat.org>2025-04-25 11:36:23 -0400
committerFreya Murphy <freya@freyacat.org>2025-04-25 11:36:23 -0400
commit16f5d0443aa072d977517be45dcf9b0d12f584b4 (patch)
treea673b4889b0d4f4c3a5d355cceb884e1cc0e57d1 /kernel/user.c
parentfmt (diff)
downloadcomus-16f5d0443aa072d977517be45dcf9b0d12f584b4.tar.gz
comus-16f5d0443aa072d977517be45dcf9b0d12f584b4.tar.bz2
comus-16f5d0443aa072d977517be45dcf9b0d12f584b4.zip
load init from ata and run it
Diffstat (limited to 'kernel/user.c')
-rw-r--r--kernel/user.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/kernel/user.c b/kernel/user.c
index 592b35b..3c686a0 100644
--- a/kernel/user.c
+++ b/kernel/user.c
@@ -98,6 +98,10 @@ static int user_setup_stack(struct pcb *pcb)
int user_load(struct pcb *pcb, struct disk *disk)
{
+ // check inputs
+ if (pcb == NULL || disk == NULL)
+ return 1;
+
pcb->regs = NULL;
// allocate memory context