提交 455925d7 编写于 作者: Z zaki

fixed 80875ce0 from https://gitee.com/zhou-jun-141/startup_init_lite/pulls/1294

修复/sys_prod目录不生效问题
Signed-off-by: Nzaki <zhoujun141@huawei.com>
Change-Id: I091e0a2fe74aab4d7a6e5f82d1f00393cf115c4f
上级 8c007030
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册