Commit 2f61a442 authored by Dmitry Monakhov's avatar Dmitry Monakhov Committed by Will Deacon
Browse files

init: fix sysfs mount arguments

It is not good idea to pass empty 'source' argument to  mount(2) because
libmount complains about incorrect /proc/self/mountinfo structure. This
affects many applications such as findmnt, umount and etc.

Let's add fake source argument to sysfs mount command as we do with all other
Reviewed-by: Andre Przywara's avatarAndre Przywara <>
Signed-off-by: default avatarDmitry Monakhov <>
Signed-off-by: default avatarWill Deacon <>
parent 5e4b563d
...@@ -33,7 +33,7 @@ static void do_mounts(void) ...@@ -33,7 +33,7 @@ static void do_mounts(void)
mount("hostfs", "/host", "9p", MS_RDONLY, "trans=virtio,version=9p2000.L"); mount("hostfs", "/host", "9p", MS_RDONLY, "trans=virtio,version=9p2000.L");
#endif #endif
mount("", "/sys", "sysfs", 0, NULL); mount("sysfs", "/sys", "sysfs", 0, NULL);
mount("proc", "/proc", "proc", 0, NULL); mount("proc", "/proc", "proc", 0, NULL);
mount("devtmpfs", "/dev", "devtmpfs", 0, NULL); mount("devtmpfs", "/dev", "devtmpfs", 0, NULL);
mkdir("/dev/pts", 0755); mkdir("/dev/pts", 0755);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment