From 4b0e47fd03fea67d755e8b1eb88ea5d194cfbc9f Mon Sep 17 00:00:00 2001 From: JING Date: Thu, 29 Apr 2021 20:09:06 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BF=AE=E5=A4=8D/userdata=E5=88=86?= =?UTF-8?q?=E5=8C=BA=E6=93=A6=E9=99=A4=E5=90=8E=E6=97=A0=E6=B3=95=E6=8C=82?= =?UTF-8?q?=E8=BD=BD=E7=9A=84=E9=97=AE=E9=A2=98=20issue#I3O8IF=E7=9A=84?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=AD=EF=BC=8C=E5=B0=86fat=E6=97=A0?= =?UTF-8?q?=E6=B3=95=E8=AF=86=E5=88=AB=E7=9A=84=E6=A0=BC=E5=BC=8F=E9=94=99?= =?UTF-8?q?=E8=AF=AF=E7=A0=81=E7=94=B1ENOENT=E6=94=B9=E4=B8=BAENOTSUP?= =?UTF-8?q?=E3=80=82=E6=AD=A4=E5=A4=84=E4=BF=AE=E6=94=B9=E6=9C=89=E9=81=97?= =?UTF-8?q?=E6=BC=8F=EF=BC=8C=E9=80=A0=E6=88=90=E6=97=A0fat=E6=A0=BC?= =?UTF-8?q?=E5=BC=8F=E7=9A=84userdata=E5=88=86=E5=8C=BA=E6=97=A0=E6=B3=95?= =?UTF-8?q?=E6=8C=82=E8=BD=BD=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- kernel/common/los_rootfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/common/los_rootfs.c b/kernel/common/los_rootfs.c index 7d9f39e1..9db34881 100644 --- a/kernel/common/los_rootfs.c +++ b/kernel/common/los_rootfs.c @@ -444,7 +444,7 @@ STATIC VOID OsMountUserdata(const CHAR *fsType) return; } err = get_errno(); - if (err == ENOENT) { + if (err == ENOTSUP) { #ifdef LOSCFG_FS_FAT ret = format(emmcUserdataDev, 0, FM_FAT32); if (ret != LOS_OK) { From c14d95f8b57434207f044aafb0747c1c8c0236df Mon Sep 17 00:00:00 2001 From: JING Date: Thu, 29 Apr 2021 20:22:12 +0800 Subject: [PATCH 2/2] revert irrelevant commit --- .../fs/jffs/smoke/It_vfs_jffs_Dac_001.cpp | 27 +------------------ 1 file changed, 1 insertion(+), 26 deletions(-) diff --git a/testsuites/unittest/fs/jffs/smoke/It_vfs_jffs_Dac_001.cpp b/testsuites/unittest/fs/jffs/smoke/It_vfs_jffs_Dac_001.cpp index 23182f4f..6e0bcc13 100644 --- a/testsuites/unittest/fs/jffs/smoke/It_vfs_jffs_Dac_001.cpp +++ b/testsuites/unittest/fs/jffs/smoke/It_vfs_jffs_Dac_001.cpp @@ -41,11 +41,7 @@ static int TestUmask(const char *path) mode_t mode; int ret; struct stat buf = { 0 }; - struct stat buf1 = { 0 }; - struct stat buf2 = { 0 }; char filename[128] = {0}; - char filename1[128] = {0}; - char filename2[128] = {0}; printf("%s, %d\n", __FUNCTION__, __LINE__); @@ -58,29 +54,8 @@ static int TestUmask(const char *path) ICUNIT_ASSERT_EQUAL(ret, 0, ret); ret = stat(filename, &buf); ICUNIT_ASSERT_EQUAL(ret, 0, ret); - ICUNIT_ASSERT_EQUAL(buf.st_mode, 040755, buf.st_mode); // mode: 040755 + ICUNIT_ASSERT_EQUAL(buf.st_mode, 040755, buf.st_mode); rmdir(filename); - - sprintf(filename1, "%s/%s", path, "file"); - ret = open(filename1, O_CREAT | O_RDWR, HIGHEST_AUTHORITY); - ICUNIT_ASSERT_NOT_EQUAL(ret, -1, ret); - ret = close(ret); - ICUNIT_ASSERT_EQUAL(ret, 0, ret); - ret = stat(filename1, &buf1); - ICUNIT_ASSERT_EQUAL(ret, 0, ret); - ICUNIT_ASSERT_EQUAL(buf1.st_mode, 0100755, buf1.st_mode); // mode: 0100755 - unlink(filename1); - - sprintf(filename2, "%s/%s", path, "file1"); - ret = creat(filename2, HIGHEST_AUTHORITY); - ICUNIT_ASSERT_NOT_EQUAL(ret, -1, ret); - ret = close(ret); - ICUNIT_ASSERT_EQUAL(ret, 0, ret); - ret = stat(filename2, &buf2); - ICUNIT_ASSERT_EQUAL(ret, 0, ret); - ICUNIT_ASSERT_EQUAL(buf2.st_mode, 0100755, buf2.st_mode); // mode: 0100755 - unlink(filename2); - return 0; }