feat: added Files app USB medium detection

This commit is contained in:
2026-05-18 20:00:42 +02:00
parent 2ceefaf1ca
commit 47e3bb54a5
14 changed files with 50 additions and 2 deletions
+9
View File
@@ -7,6 +7,8 @@
#pragma once
#include <Fs/Vfs.hpp>
#include <Fs/FsProbe.hpp>
#include <Drivers/Storage/BlockDevice.hpp>
#include <Sched/Scheduler.hpp>
#include <Memory/PageFrameAllocator.hpp>
#include <Memory/HHDM.hpp>
@@ -126,4 +128,11 @@ namespace Montauk {
static int Sys_DriveLabel(int driveNumber, char* outLabel, int maxLen) {
return Fs::Vfs::VfsDriveLabel(driveNumber, outLabel, maxLen);
}
static int Sys_DriveKind(int driveNumber) {
int blockDev = Fs::FsProbe::GetBlockDeviceForDrive(driveNumber);
if (blockDev < 0) return 0;
auto* dev = Drivers::Storage::GetBlockDevice(blockDev);
return dev ? (int)dev->Kind : 0;
}
};