diff --git a/services/init/standard/switch_root.c b/services/init/standard/switch_root.c index fde1b946453ba151dbe5c3ca0b073a0d017e197a..dea0b1cfe0e276e29177a81489cf3944d4e7ea8d 100644 --- a/services/init/standard/switch_root.c +++ b/services/init/standard/switch_root.c @@ -82,15 +82,15 @@ static bool UnderBasicMountPoint(const char *path) } size_t pathSize = strlen(path); - if (strncmp(path, "/dev", strlen("/dev")) == 0 && pathSize > strlen("/dev")) { + if (strncmp(path, "/dev/", strlen("/dev/")) == 0 && pathSize > strlen("/dev/")) { return true; } - if (strncmp(path, "/sys", strlen("/sys")) == 0 && pathSize > strlen("/sys")) { + if (strncmp(path, "/sys/", strlen("/sys/")) == 0 && pathSize > strlen("/sys/")) { return true; } - if (strncmp(path, "/proc", strlen("/proc")) == 0 && pathSize > strlen("/proc")) { + if (strncmp(path, "/proc/", strlen("/proc/")) == 0 && pathSize > strlen("/proc/")) { return true; } return false;