Luna/kernel/src/fs/devices/DeviceRegistry.h

23 lines
473 B
C
Raw Normal View History

#pragma once
#include "fs/devices/Device.h"
#include <luna/SharedPtr.h>
typedef Result<SharedPtr<Device>> (*device_create_func_t)(void);
namespace DeviceRegistry
{
enum DeviceMajorTypes : u32
{
Null = 0,
Console = 1,
Memory = 2
};
Result<SharedPtr<Device>> create_special_device(u32 major, u32 minor);
Result<void> register_special_device(u32 major, u32 minor, device_create_func_t initializer);
Result<void> init();
}