提交 ec138686 编写于 作者: S sun_fan

init: fix bugs

Signed-off-by: Nsun_fan <sun_fan1@hoperun.com>
上级 8d948a8b
......@@ -342,11 +342,11 @@ static unsigned long ParseDefaultMountFlag(const char *str)
return flags;
}
unsigned long GetMountFlags(char *flags, char *fsSpecificData, size_t fsSpecificDataSize)
unsigned long GetMountFlags(char *mountFlag, char *fsSpecificData, size_t fsSpecificDataSize)
{
unsigned long flags = 0;
if (flags == NULL || fsSpecificData == NULL) {
if (mountFlag == NULL || fsSpecificData == NULL) {
return 0;
}
......@@ -358,7 +358,7 @@ unsigned long GetMountFlags(char *flags, char *fsSpecificData, size_t fsSpecific
// If the item configured in fstab contains flag over than 15,
// @SplitStringExt can handle it and parse them all. but the parse function will drop it.
const int maxCount = 15;
char **flagsVector = SplitStringExt(flags, ",", &flagCount, maxCount);
char **flagsVector = SplitStringExt(mountFlag, ",", &flagCount, maxCount);
if (flagsVector == NULL || flagCount == 0) {
// No flags or something wrong in SplitStringExt,just return.
......
......@@ -66,7 +66,7 @@ int MountOneItem(FstabItem *item);
MountStatus GetMountStatusForMountPoint(const char *mp);
int MountAllWithFstabFile(const char *file, bool required);
int UmountAllWithFstabFile(const char *file);
unsigned long GetMountFlags(char *flags, char *fsSpecificFlags, size_t fsSpecificFlagSize);
unsigned long GetMountFlags(char *mountFlag, char *fsSpecificFlags, size_t fsSpecificFlagSize);
#ifdef __cplusplus
#if __cplusplus
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册