All checks were successful
continuous-integration/drone/push Build is passing
This is now duplicate information that can be queried using device->device_path().
31 lines
705 B
C++
31 lines
705 B
C++
#pragma once
|
|
|
|
#include "fs/VFS.h"
|
|
#include "fs/devices/Device.h"
|
|
#include <luna/SharedPtr.h>
|
|
#include <sys/types.h>
|
|
|
|
namespace DeviceRegistry
|
|
{
|
|
enum DeviceMajorTypes : u32
|
|
{
|
|
Null = 0,
|
|
Console = 1,
|
|
Memory = 2,
|
|
Framebuffer = 3,
|
|
Disk = 4,
|
|
DiskPartition = 5,
|
|
};
|
|
|
|
Result<SharedPtr<Device>> fetch_special_device(u32 major, u32 minor);
|
|
|
|
Result<void> register_special_device(u32 major, u32 minor, SharedPtr<Device> device, mode_t mode = 0666);
|
|
|
|
Result<void> init();
|
|
|
|
// Used for file systems (like tmpfs) that do not have a host device.
|
|
dev_t next_null_device_id();
|
|
|
|
Result<SharedPtr<VFS::FileSystem>> create_devfs_instance();
|
|
}
|