| 45 | } |
| 46 | |
| 47 | static BAN::ErrorOr<BAN::RefPtr<BlockDevice>> find_block_device_by_name(BAN::StringView name) |
| 48 | { |
| 49 | auto device_inode = TRY(DevFileSystem::get().root_inode()->find_inode(name)); |
| 50 | if (!device_inode->mode().ifblk()) |
| 51 | return BAN::Error::from_errno(ENOTBLK); |
| 52 | return BAN::RefPtr<BlockDevice>(static_cast<BlockDevice*>(device_inode.ptr())); |
| 53 | } |
| 54 | |
| 55 | static BAN::RefPtr<FileSystem> load_fallback_root_filesystem() |
| 56 | { |
no test coverage detected