1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 11:58:12 +00:00

Kernel: Some improvements to the mount syscall

- You must now have superuser privileges to use mount().
- We now verify that the mount point is a valid path first, before
  trying to find a filesystem on the specified device.
- Convert some dbgprintf() to dbg().
This commit is contained in:
Andreas Kling 2019-08-02 19:03:50 +02:00
parent c76668644b
commit 31de5dee26
3 changed files with 33 additions and 19 deletions

View file

@ -57,7 +57,8 @@ public:
~VFS();
bool mount_root(NonnullRefPtr<FS>&&);
bool mount(NonnullRefPtr<FS>&&, StringView path);
KResult mount(NonnullRefPtr<FS>&&, StringView path);
KResult mount(NonnullRefPtr<FS>&&, Custody& mount_point);
KResultOr<NonnullRefPtr<FileDescription>> open(RefPtr<Device>&&, int options);
KResultOr<NonnullRefPtr<FileDescription>> open(StringView path, int options, mode_t mode, Custody& base);