feat: added Files app USB medium detection
This commit is contained in:
@@ -160,6 +160,7 @@ namespace Montauk {
|
||||
static constexpr uint64_t SYS_INPUT_WAIT = 123;
|
||||
static constexpr uint64_t SYS_DRIVELABEL = 124;
|
||||
static constexpr uint64_t SYS_NETSTATUS = 125;
|
||||
static constexpr uint64_t SYS_DRIVEKIND = 127;
|
||||
|
||||
static constexpr uint32_t CLIPBOARD_MAX_TEXT_BYTES = 256 * 1024;
|
||||
|
||||
|
||||
@@ -123,6 +123,8 @@ struct DesktopState {
|
||||
SvgIcon icon_exec_lg;
|
||||
SvgIcon icon_drive;
|
||||
SvgIcon icon_drive_lg;
|
||||
SvgIcon icon_drive_usb;
|
||||
SvgIcon icon_drive_usb_lg;
|
||||
SvgIcon icon_delete;
|
||||
SvgIcon icon_copy;
|
||||
SvgIcon icon_cut;
|
||||
|
||||
@@ -164,6 +164,11 @@ namespace montauk {
|
||||
inline int drivelabel(int drive, char* outLabel, int maxLen) {
|
||||
return (int)syscall3(Montauk::SYS_DRIVELABEL, (uint64_t)drive, (uint64_t)outLabel, (uint64_t)maxLen);
|
||||
}
|
||||
// Returns the kernel BlockDeviceKind backing the drive: 0=unknown/ramdisk,
|
||||
// 1=SATA, 2=SATAPI, 3=NVMe, 4=USB MSC.
|
||||
inline int drivekind(int drive) {
|
||||
return (int)syscall1(Montauk::SYS_DRIVEKIND, (uint64_t)drive);
|
||||
}
|
||||
|
||||
// Memory
|
||||
inline void* alloc(uint64_t size) { return (void*)syscall1(Montauk::SYS_ALLOC, size); }
|
||||
|
||||
Reference in New Issue
Block a user