fs Add mount subcommand

This commit is contained in:
2025-10-14 00:40:17 +02:00
parent 25cb309105
commit c895c5db3e
7 changed files with 76 additions and 4 deletions

View File

@ -43,3 +43,11 @@ int32_t devctl(Dev_t *devh, uint64_t cmd, uint8_t *buffer, size_t len, uint64_t
int32_t rand(void) {
return syscall(SYS_RAND, 0, 0, 0, 0, 0, 0);
}
int32_t vfsmount(char *mountpoint, char *fstype, Dev_t *dev, bool format) {
return syscall(SYS_VFSMOUNT, (uint64_t)mountpoint, (uint64_t)fstype, (uint64_t)dev, (uint64_t)format, 0, 0);
}
int32_t vfsunmount(char *mountpoint) {
return syscall(SYS_VFSUNMOUNT, (uint64_t)mountpoint, 0, 0, 0, 0, 0);
}

View File

@ -3,6 +3,7 @@
#include <stdint.h>
#include <stddef.h>
#include <stdbool.h>
#include <sysdefs/devctl.h>
void debugprint(const char *string);
@ -14,5 +15,7 @@ int32_t mman_unmap(uint8_t *addr);
int32_t schedrelease(void);
int32_t devctl(Dev_t *devh, uint64_t cmd, uint8_t *buffer, size_t len, uint64_t extra);
int32_t rand(void);
int32_t vfsmount(char *mountpoint, char *fstype, Dev_t *dev, bool format);
int32_t vfsunmount(char *mountpoint);
#endif // ULIB_SYSTEM_SYSTEM_H_