diff --git a/components/fs/vfs/vfs_partition.c b/components/fs/vfs/vfs_partition.c index c4c818f7ad4e435139d103f3a31e5a39c297d054..ceaef90328f93dd6419873d95f71145948e9ca44 100644 --- a/components/fs/vfs/vfs_partition.c +++ b/components/fs/vfs/vfs_partition.c @@ -160,7 +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->mPath != NULL) && (strcmp(iter->mPath, partName) == 0)) { + if ((iter->mDev != NULL) && (strcmp(iter->mDev, partName) == 0)) { errno = EBUSY; return (int)LOS_NOK; }