mirror of
https://github.com/Fennix-Project/Kernel.git
synced 2025-05-28 15:34:33 +00:00
Added --init arg
This commit is contained in:
parent
7e7e89342d
commit
efea5e7aaf
16
KConfig.cpp
16
KConfig.cpp
@ -40,9 +40,15 @@ static struct cag_option ConfigOptions[] = {
|
|||||||
{.identifier = 'd',
|
{.identifier = 'd',
|
||||||
.access_letters = "dD",
|
.access_letters = "dD",
|
||||||
.access_name = "drvdir",
|
.access_name = "drvdir",
|
||||||
.value_name = "VALUE",
|
.value_name = "PATH",
|
||||||
.description = "Directory to load drivers from"},
|
.description = "Directory to load drivers from"},
|
||||||
|
|
||||||
|
{.identifier = 'i',
|
||||||
|
.access_letters = "iI",
|
||||||
|
.access_name = "init",
|
||||||
|
.value_name = "PATH",
|
||||||
|
.description = "Path to init program"},
|
||||||
|
|
||||||
{.identifier = 'h',
|
{.identifier = 'h',
|
||||||
.access_letters = "h",
|
.access_letters = "h",
|
||||||
.access_name = "help",
|
.access_name = "help",
|
||||||
@ -57,6 +63,7 @@ KernelConfig ParseConfig(char *Config)
|
|||||||
struct KernelConfig config = {Memory::MemoryAllocatorType::Pages,
|
struct KernelConfig config = {Memory::MemoryAllocatorType::Pages,
|
||||||
0,
|
0,
|
||||||
{'/', 's', 'y', 's', 't', 'e', 'm', '/', 'd', 'r', 'i', 'v', 'e', 'r', 's', '\0'},
|
{'/', 's', 'y', 's', 't', 'e', 'm', '/', 'd', 'r', 'i', 'v', 'e', 'r', 's', '\0'},
|
||||||
|
{'/', 's', 'y', 's', 't', 'e', 'm', '/', 'i', 'n', 'i', 't', '\0'},
|
||||||
0};
|
0};
|
||||||
|
|
||||||
if (Config == NULL)
|
if (Config == NULL)
|
||||||
@ -321,6 +328,13 @@ ParseSuccess:
|
|||||||
KPrint("\eAAFFAAUsing %s as driver directory", value);
|
KPrint("\eAAFFAAUsing %s as driver directory", value);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case 'i':
|
||||||
|
{
|
||||||
|
value = cag_option_get_value(&context);
|
||||||
|
strcpy(config.InitPath, value);
|
||||||
|
KPrint("\eAAFFAAUsing %s as init program", value);
|
||||||
|
break;
|
||||||
|
}
|
||||||
case 'h':
|
case 'h':
|
||||||
{
|
{
|
||||||
KPrint("\n---------------------------------------------------------------------------\nUsage: kernel.fsys [OPTION]...\nKernel configuration.");
|
KPrint("\n---------------------------------------------------------------------------\nUsage: kernel.fsys [OPTION]...\nKernel configuration.");
|
||||||
|
@ -9,6 +9,7 @@ struct KernelConfig
|
|||||||
Memory::MemoryAllocatorType AllocatorType;
|
Memory::MemoryAllocatorType AllocatorType;
|
||||||
bool SchedulerType;
|
bool SchedulerType;
|
||||||
char DriverDirectory[256];
|
char DriverDirectory[256];
|
||||||
|
char InitPath[256];
|
||||||
int Cores;
|
int Cores;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user