From 2094d2a53aacb6fb5918c116f373ac4809548b4d Mon Sep 17 00:00:00 2001 From: Joachim Nilsson Date: Tue, 5 Feb 2019 10:31:36 +0100 Subject: [PATCH] Warn if Finit fail to mount /proc and /sys Signed-off-by: Joachim Nilsson --- src/finit.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/finit.c b/src/finit.c index b6c5c965..86538bb6 100644 --- a/src/finit.c +++ b/src/finit.c @@ -345,8 +345,10 @@ int main(int argc, char* argv[]) */ chdir("/"); umask(0); - mount("none", "/proc", "proc", 0, NULL); - mount("none", "/sys", "sysfs", 0, NULL); + if (mount("none", "/proc", "proc", 0, NULL)) + _pe("Failed mounting /proc"); + if (mount("none", "/sys", "sysfs", 0, NULL)) + _pe("Failed mounting /sysfs"); if (fisdir("/proc/bus/usb")) mount("none", "/proc/bus/usb", "usbfs", 0, NULL);