feat: expose drive labels to userspace, render in Files
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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); }
|
||||
|
||||
Reference in New Issue
Block a user