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
@@ -57,6 +57,7 @@ namespace Montauk {
static constexpr uint64_t SYS_FDELETE = 77;
static constexpr uint64_t SYS_FMKDIR = 78;
static constexpr uint64_t SYS_DRIVELIST = 79;
static constexpr uint64_t SYS_DRIVELABEL = 124;
static constexpr uint64_t SYS_TERMSCALE = 43;
static constexpr uint64_t SYS_RESOLVE = 44;
static constexpr uint64_t SYS_GETRANDOM = 45;
+1
View File
@@ -91,6 +91,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
@@ -152,6 +152,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); }