!923 挑单 其他分区已mount时会引起格式化失败至monthly_20221018

Merge pull request !923 from wangchen/1118_1030_m
This commit is contained in:
openharmony_ci 2022-11-18 10:21:09 +00:00 committed by Gitee
commit 780227205d
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
1 changed files with 1 additions and 2 deletions

View File

@ -160,8 +160,7 @@ int LOS_PartitionFormat(const char *partName, char *fsType, void *data)
format is not allowed when the device has been mounted. */
struct MountPoint *iter = NULL;
LOS_MP_FOR_EACH_ENTRY(iter) {
if ((iter->mFs != NULL) && (iter->mFs->fsType != NULL) &&
strcmp(iter->mFs->fsType, fsType) == 0) {
if ((iter->mPath != NULL) && (strcmp(iter->mPath, partName) == 0)) {
errno = EBUSY;
return (int)LOS_NOK;
}