stos: ob: Initialize object manager
Signed-off-by: Chloe M. <chloe@mensia.org>
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
/*
|
||||
* Copyright (c) 2026, Chloe M.
|
||||
* Provided under the BSD-3 clause.
|
||||
*
|
||||
* Description: Object manager init funcs
|
||||
* Author: Chloe M.
|
||||
*/
|
||||
|
||||
#include <ob/object.h>
|
||||
#include <ex/trace.h>
|
||||
#include <ke/knot.h>
|
||||
|
||||
#define DTRACE(Fmt, ...) \
|
||||
TRACE("[ OB ]: " Fmt, ##__VA_ARGS__)
|
||||
|
||||
/* Globals */
|
||||
static ST_OBJECT *RootDirectory;
|
||||
|
||||
VOID
|
||||
ObInitManager(VOID)
|
||||
{
|
||||
ST_STATUS Status;
|
||||
|
||||
Status = ObCreateDirectory(
|
||||
"/",
|
||||
&RootDirectory
|
||||
);
|
||||
|
||||
if (Status != STATUS_SUCCESS) {
|
||||
KeKnot(KNOT_MISC, "failed to initialize object manager\n");
|
||||
}
|
||||
|
||||
DTRACE("mounted root at '/'\n");
|
||||
}
|
||||
Reference in New Issue
Block a user