mirror of
https://github.com/troglobit/finit.git
synced 2026-11-13 17:00:16 +00:00
Mounting devtmpfs may fail if already mounted
Ignore EBUSY errors, the kernel has the ability to automount /dev as soon as the rootfs has been mounted. This may be added to procfs and sysfs later, so we make this a general change in fs_init(). Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
1 parent
e0a65f67c9
commit
77aa941e84
1 file changed
+4
-1
+4
-1
@@ -207,6 +207,9 @@ static void fs_mount(void)
|
|||||||
* for early multi-console, and /sys for the cgroups support. Any
|
* for early multi-console, and /sys for the cgroups support. Any
|
||||||
* occurrence of these file systems in /etc/fstab will replace these
|
* occurrence of these file systems in /etc/fstab will replace these
|
||||||
* mounts later in fs_mount()
|
* mounts later in fs_mount()
|
||||||
|
*
|
||||||
|
* Ignore any mount errors with EBUSY, kernel likely alread mounted
|
||||||
|
* the filesystem for us automatically, e.g., CONFIG_DEVTMPFS_MOUNT.
|
||||||
*/
|
*/
|
||||||
static void fs_init(void)
|
static void fs_init(void)
|
||||||
{
|
{
|
||||||
@@ -223,7 +226,7 @@ static void fs_init(void)
|
|||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
rc = mount(fs[i].spec, fs[i].file, fs[i].type, 0, NULL);
|
rc = mount(fs[i].spec, fs[i].file, fs[i].type, 0, NULL);
|
||||||
if (rc)
|
if (rc && errno != EBUSY)
|
||||||
_pe("Failed mounting %s on %s", fs[i].spec, fs[i].file);
|
_pe("Failed mounting %s on %s", fs[i].spec, fs[i].file);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user