feat: expose drive labels to userspace, render in Files

This commit is contained in:
2026-04-22 07:45:33 +02:00
parent 0dfb3e8dbb
commit 6c2796f8bd
20 changed files with 261 additions and 38 deletions
+1
View File
@@ -157,6 +157,7 @@ namespace Montauk {
static constexpr uint64_t SYS_CLIPBOARD_GET_TEXT = 121;
static constexpr uint64_t SYS_CLIPBOARD_CLEAR = 122;
static constexpr uint64_t SYS_INPUT_WAIT = 123;
static constexpr uint64_t SYS_DRIVELABEL = 124;
static constexpr uint32_t CLIPBOARD_MAX_TEXT_BYTES = 256 * 1024;
+1
View File
@@ -92,6 +92,7 @@ extern "C" {
#define MTK_SYS_FMKDIR 78
#define MTK_SYS_FRENAME 94
#define MTK_SYS_DRIVELIST 79
#define MTK_SYS_DRIVELABEL 124
#define MTK_SYS_AUDIOOPEN 80
#define MTK_SYS_AUDIOCLOSE 81
#define MTK_SYS_AUDIOWRITE 82
+3
View File
@@ -161,6 +161,9 @@ namespace montauk {
inline int drivelist(int* outDrives, int max) {
return (int)syscall2(Montauk::SYS_DRIVELIST, (uint64_t)outDrives, (uint64_t)max);
}
inline int drivelabel(int drive, char* outLabel, int maxLen) {
return (int)syscall3(Montauk::SYS_DRIVELABEL, (uint64_t)drive, (uint64_t)outLabel, (uint64_t)maxLen);
}
// Memory
inline void* alloc(uint64_t size) { return (void*)syscall1(Montauk::SYS_ALLOC, size); }