feat(kernel/driver): add CreateDeviceFile function in the API

Signed-off-by: EnderIce2 <enderice2@protonmail.com>
This commit is contained in:
EnderIce2 2025-03-02 21:32:00 +00:00
parent 1af2cf657d
commit 426499090e
No known key found for this signature in database
GPG Key ID: 2EE20AF089811A5A

View File

@ -682,6 +682,13 @@ namespace v0
/* --------- */ /* --------- */
dev_t CreateDeviceFile(dev_t DriverID, const char *name, mode_t mode, const InodeOperations *Operations)
{
dbg_api("%d, %s, %#o, %#lx", DriverID, name, mode, Operations);
return DriverManager->CreateDeviceFile(DriverID, name, mode, Operations);
}
dev_t RegisterDevice(dev_t DriverID, DeviceType Type, const InodeOperations *Operations) dev_t RegisterDevice(dev_t DriverID, DeviceType Type, const InodeOperations *Operations)
{ {
dbg_api("%d, %d, %#lx", DriverID, Type, Operations); dbg_api("%d, %d, %#lx", DriverID, Type, Operations);
@ -765,6 +772,7 @@ static struct APISymbols APISymbols_v0[] = {
{"__iLine", (void *)v0::iLine}, {"__iLine", (void *)v0::iLine},
{"__iPin", (void *)v0::iPin}, {"__iPin", (void *)v0::iPin},
{"__CreateDeviceFile", (void *)v0::CreateDeviceFile},
{"__RegisterDevice", (void *)v0::RegisterDevice}, {"__RegisterDevice", (void *)v0::RegisterDevice},
{"__UnregisterDevice", (void *)v0::UnregisterDevice}, {"__UnregisterDevice", (void *)v0::UnregisterDevice},
{"__ReportInputEvent", (void *)v0::ReportInputEvent}, {"__ReportInputEvent", (void *)v0::ReportInputEvent},