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
filesystems.
Reviewed-by: Andre Przywara's avatarAndre Przywara <andre.przywara@arm.com>
Signed-off-by: default avatarDmitry Monakhov <dmtrmonakhov@yandex-team.ru>
Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
parent 5e4b563d
......@@ -33,7 +33,7 @@ static void do_mounts(void)
#ifndef CONFIG_GUEST_PRE_INIT
mount("hostfs", "/host", "9p", MS_RDONLY, "trans=virtio,version=9p2000.L");
#endif
mount("", "/sys", "sysfs", 0, NULL);
mount("sysfs", "/sys", "sysfs", 0, NULL);
mount("proc", "/proc", "proc", 0, NULL);
mount("devtmpfs", "/dev", "devtmpfs", 0, NULL);
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