summaryrefslogtreecommitdiff
path: root/Base
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2020-04-03 21:20:46 +0200
committerAndreas Kling <kling@serenityos.org>2020-04-03 21:28:57 +0200
commit9ae3cced764cabec52b15f50b648afe82eeac449 (patch)
tree46cb4c41b00931bc779a5488fdb10387bb22a111 /Base
parent28be90120b17fb4781078afeec924137d505b3e4 (diff)
downloadserenity-9ae3cced764cabec52b15f50b648afe82eeac449.zip
Revert "Kernel & Userland: Allow to mount image files formatted with Ext2FS"
This reverts commit a60ea79a41845767ce40f225de20da7c99534ad1. Reverting these changes since they broke things. Fixes #1608.
Diffstat (limited to 'Base')
-rw-r--r--Base/etc/fstab6
-rw-r--r--Base/usr/share/man/man2/mount.md28
-rw-r--r--Base/usr/share/man/man8/mount.md32
3 files changed, 24 insertions, 42 deletions
diff --git a/Base/etc/fstab b/Base/etc/fstab
index a80aefc78a..08b414ddec 100644
--- a/Base/etc/fstab
+++ b/Base/etc/fstab
@@ -5,6 +5,6 @@
/dev /dev bind bind,nosuid
/bin /bin bind bind,nodev
-none /proc proc nosuid
-none /dev/pts devpts noexec,nosuid
-none /tmp tmp nodev,nosuid
+proc /proc proc nosuid
+devpts /dev/pts devpts noexec,nosuid
+tmp /tmp tmp nodev,nosuid
diff --git a/Base/usr/share/man/man2/mount.md b/Base/usr/share/man/man2/mount.md
index 5f69543802..1d54e6be2c 100644
--- a/Base/usr/share/man/man2/mount.md
+++ b/Base/usr/share/man/man2/mount.md
@@ -7,13 +7,12 @@ mount - mount a filesystem
```**c++
#include <unistd.h>
-int mount(int source_fd, const char* target, const char* fs_type, int flags);
+int mount(const char* source, const char* target, const char* fs_type, int flags);
```
## Description
-`mount()` mounts a filesystem stored at `source_fd` by overlaying its contents
-over `target`.
+`mount()` mounts a filesystem stored at `source` by overlaying its contents over `target`.
`fs_type` must be one of the following supported filesystems:
@@ -22,10 +21,9 @@ over `target`.
* `DevPtsFS` (or `devpts`): The pseudoterminal pseudo-filesystem (normally mounted at `/dev/pts`).
* `TmpFS` (or `tmp`): A non-persistent filesystem that stores all its data in RAM. An instance of this filesystem is normally mounted at `/tmp`.
-For Ext2FS, `source_fd` must refer to an open file descriptor to a file containing
-the filesystem image. This may be a device file or any other seekable file. All
-the other filesystems ignore the `source_fd` — you can even pass an invalid file
-descriptor such as -1.
+For Ext2FS, `source` must be a path to a block device storing the filesystem contents. All
+the other filesystems ignore the `source` argument (by convention, it should have the same
+value as `fs_type`).
The following `flags` are supported:
@@ -39,22 +37,14 @@ mounted file system.
### Bind mounts
-If `MS_BIND` is specified in `flags`, `fs_type` is ignored and a bind mount is
-performed instead. In this case, the file or directory specified by `source_fd`
-is overlayed over `target` — the target appears to be replaced by a copy of the
-source. This can be used as an alternative to symlinks or hardlinks.
+If `MS_BIND` is specified in `flags`, `fs_type` is ignored and a bind mount is performed
+instead. In this case `source` is treated as a path to a file or directory whose contents
+are overlayed over `target`. This can be used as an alternative to symlinks or hardlinks.
## Errors
-* `EFAULT`: The `fs_type` or `target` are invalid strings.
* `EPERM`: The current process does not have superuser privileges.
-* `ENODEV`: The `fs_type` is unrecognized, or the file descriptor to source is
- not found, or the source doesn't contain a valid filesystem image. Also, this
- error occurs if `fs_type` is valid, but the file descriptor from `source_fd`
- is not seekable.
-* `EBADF`: If the `source_fd` is not valid, and either `fs_type` specifies a
- file-backed filesystem (and not a pseudo filesystem), or `MS_BIND` is
- specified in flags.
+* `ENODEV`: The `fs_type` is unrecognized, or the device is not found, or the device doesn't contain a valid filesystem image.
All of the usual path resolution errors may also occur.
diff --git a/Base/usr/share/man/man8/mount.md b/Base/usr/share/man/man8/mount.md
index f63d45cf23..7f0b9c2c4b 100644
--- a/Base/usr/share/man/man8/mount.md
+++ b/Base/usr/share/man/man8/mount.md
@@ -12,26 +12,18 @@ $ mount
## Description
-If invoked without any arguments, `mount` prints a list of all currently mounted
-filesystems.
-
-If invoked as `mount -a`, `mount` mounts all the filesystems configured in
-`/etc/fstab`. This is normally done on system startup by
-[`SystemServer`(7)](../man7/SystemServer.md).
-
-Otherwise, `mount` performs a single filesystem mount. Source should be a path
-to a file containing the filesystem image. Target, and fstype have the same
-meaning as in the [`mount`(2)](../man2/mount.md) syscall (if not specified,
-fstype defaults to `ext2`).
-
-A special source value "none" is recognized, in which case
-[`mount`(8)](mount.md) will not attempt to open the source as a file, and will
-pass an invalid file descriptor to [`mount`(2)](../man2/mount.md). This is
-useful for mounting pseudo filesystems.
-
-Options correspond to the mount flags, and should be specified as a
-comma-separated list of flag names (lowercase and without the `MS_` prefix).
-Additionally, the name `defaults` is accepted and ignored.
+If invoked without any arguments, `mount` prints a list of all currently mounted filesystems.
+
+If invoked as `mount -a`, `mount` mounts all the filesystems configured in `/etc/fstab`. This
+is normally done on system startup by [`SystemServer`(7)](../man7/SystemServer.md).
+
+Otherwise, `mount` performs a single filesystem mount. Source, target, and fstype have the
+same meaning as in the [`mount`(2)](../man2/mount.md) syscall (if not specified, fstype
+defaults to `ext2`).
+
+Options correspond to the mount flags, and should be specified as a comma-separated list of
+flag names (lowercase and without the `MS_` prefix). Additionally, the name `defaults` is
+accepted and ignored.
## Files