提交 723dd16a 编写于 作者: O openharmony_ci 提交者: Gitee

!6 【轻量级 PR】:tweak code for simplicity

Merge pull request !6 from Gymee/N/A
......@@ -198,24 +198,16 @@ static int GetMountFlag(unsigned long* mountflags, const char* targetStr)
if (strncmp(targetStr, "nodev", strlen("nodev")) == 0) {
(*mountflags) |= MS_NODEV;
return 1;
}
if (strncmp(targetStr, "noexec", strlen("noexec")) == 0) {
} else if (strncmp(targetStr, "noexec", strlen("noexec")) == 0) {
(*mountflags) |= MS_NOEXEC;
return 1;
}
if (strncmp(targetStr, "nosuid", strlen("nosuid")) == 0) {
} else if (strncmp(targetStr, "nosuid", strlen("nosuid")) == 0) {
(*mountflags) |= MS_NOSUID;
return 1;
}
if (strncmp(targetStr, "rdonly", strlen("rdonly")) == 0) {
} else if (strncmp(targetStr, "rdonly", strlen("rdonly")) == 0) {
(*mountflags) |= MS_RDONLY;
return 1;
} else {
return 0;
}
return 0;
return 1;
}
static int CountSpaces(const char* cmdContent, size_t* spaceCnt, size_t* spacePosArr, size_t spacePosArrLen)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册