From 08436dec9eeb492cc81d49166630d6aab65e8c8e Mon Sep 17 00:00:00 2001 From: wangchen <253227059@qq.com> Date: Thu, 17 Nov 2022 13:00:31 +0000 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=85=B6=E4=BB=96=E5=88=86=E5=8C=BA?= =?UTF-8?q?=E5=B7=B2mount=E6=97=B6=E4=BC=9A=E5=BC=95=E8=B5=B7=E6=A0=BC?= =?UTF-8?q?=E5=BC=8F=E5=8C=96=E5=A4=B1=E8=B4=A5=20=E3=80=90=E8=83=8C?= =?UTF-8?q?=E6=99=AF=E3=80=91=E5=85=B6=E4=BB=96=E5=88=86=E5=8C=BA=E5=B7=B2?= =?UTF-8?q?mount=E6=97=B6=E4=BC=9A=E5=BC=95=E8=B5=B7=E6=A0=BC=E5=BC=8F?= =?UTF-8?q?=E5=8C=96=E5=A4=B1=E8=B4=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 【修改方案】 1, 格式化时判断方式修改为路径 【影响】 对现有的产品编译不会有影响。 re #I61P4K Signed-off-by: wangchen --- components/fs/vfs/vfs_partition.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/components/fs/vfs/vfs_partition.c b/components/fs/vfs/vfs_partition.c index 367ea1dd..c4c818f7 100644 --- a/components/fs/vfs/vfs_partition.c +++ b/components/fs/vfs/vfs_partition.c @@ -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; }