From fcc253f95b949f2367dd785d792c917836c74a33 Mon Sep 17 00:00:00 2001 From: zhangkaixiang Date: Mon, 24 Jul 2023 09:58:03 +0800 Subject: [PATCH] modify /mnt/external to /mnt/data/external Signed-off-by: zhangkaixiang --- .../include/volume/external_volume_info.h | 2 +- services/storage_daemon/storage_daemon.cfg | 2 +- services/storage_daemon/user/src/mount_manager.cpp | 1 + .../volume/test/volume_info_test.cpp | 14 +++++++------- 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/services/storage_daemon/include/volume/external_volume_info.h b/services/storage_daemon/include/volume/external_volume_info.h index 6cd62f7d..a238d9b4 100644 --- a/services/storage_daemon/include/volume/external_volume_info.h +++ b/services/storage_daemon/include/volume/external_volume_info.h @@ -53,7 +53,7 @@ private: dev_t device_; const std::string devPathDir_ = "/dev/block/%s"; - const std::string mountPathDir_ = "/mnt/external/%s"; + const std::string mountPathDir_ = "/mnt/data/external/%s"; std::vector supportMountType_ = { "ext2", "ext3", "ext4", "ntfs", "exfat", "vfat" }; std::map supportFormatType_ = {{"exfat", "mkfs.exfat"}, {"vfat", "newfs_msdos"}}; diff --git a/services/storage_daemon/storage_daemon.cfg b/services/storage_daemon/storage_daemon.cfg index 1c0c987b..710fefdf 100644 --- a/services/storage_daemon/storage_daemon.cfg +++ b/services/storage_daemon/storage_daemon.cfg @@ -6,7 +6,7 @@ "mount configfs none /config", "chown foundation system /config/hmdfs", "chown foundation system /config/sharefs", - "mkdir /mnt/external 0751 root file_manager" + "mkdir /mnt/data/external 0751 root file_manager" ] } ], diff --git a/services/storage_daemon/user/src/mount_manager.cpp b/services/storage_daemon/user/src/mount_manager.cpp index 9c0988f0..0049fb5b 100644 --- a/services/storage_daemon/user/src/mount_manager.cpp +++ b/services/storage_daemon/user/src/mount_manager.cpp @@ -60,6 +60,7 @@ MountManager::MountManager() {"/storage/cloud/%d", 0711, OID_USER_DATA_RW, OID_USER_DATA_RW}, {"/mnt/share/", 0711, OID_ROOT, OID_ROOT}, {"/mnt/share/%d/", 0711, OID_ROOT, OID_ROOT}, + {"/mnt/data/%d/", 0711, OID_ROOT, OID_ROOT}, {"/mnt/hmdfs/", 0711, OID_ROOT, OID_ROOT}, {"/mnt/hmdfs/%d/", 0711, OID_ROOT, OID_ROOT}, {"/mnt/hmdfs/%d/account", 0711, OID_ROOT, OID_ROOT}, diff --git a/services/storage_daemon/volume/test/volume_info_test.cpp b/services/storage_daemon/volume/test/volume_info_test.cpp index 73506f1f..42b30da9 100644 --- a/services/storage_daemon/volume/test/volume_info_test.cpp +++ b/services/storage_daemon/volume/test/volume_info_test.cpp @@ -147,7 +147,7 @@ HWTEST_F(VolumeInfoTest, Storage_Service_VolumeInfoTest_Destroy_003, TestSize.Le ret = mock.Destroy(); EXPECT_TRUE(ret == E_OK); - StorageTestUtils::RmDirRecurse("/mnt/external/" + volId); + StorageTestUtils::RmDirRecurse("/mnt/data/external/" + volId); GTEST_LOG_(INFO) << "Storage_Service_VolumeInfoTest_Destroy_003 end"; } @@ -196,7 +196,7 @@ HWTEST_F(VolumeInfoTest, Storage_Service_VolumeInfoTest_Mount_002, TestSize.Leve ret = mock.Mount(mountFlags); EXPECT_TRUE(ret == E_MOUNT); - StorageTestUtils::RmDirRecurse("/mnt/external/" + volId); + StorageTestUtils::RmDirRecurse("/mnt/data/external/" + volId); GTEST_LOG_(INFO) << "Storage_Service_VolumeInfoTest_Mount_002 end"; } @@ -227,7 +227,7 @@ HWTEST_F(VolumeInfoTest, Storage_Service_VolumeInfoTest_Mount_003, TestSize.Leve ret = mock.Mount(mountFlags); EXPECT_TRUE(ret == E_OK); - StorageTestUtils::RmDirRecurse("/mnt/external/" + volId); + StorageTestUtils::RmDirRecurse("/mnt/data/external/" + volId); GTEST_LOG_(INFO) << "Storage_Service_VolumeInfoTest_Mount_003 end"; } @@ -261,7 +261,7 @@ HWTEST_F(VolumeInfoTest, Storage_Service_VolumeInfoTest_Mount_004, TestSize.Leve ret = mock.Mount(mountFlags); EXPECT_TRUE(ret == E_OK); - StorageTestUtils::RmDirRecurse("/mnt/external/" + volId); + StorageTestUtils::RmDirRecurse("/mnt/data/external/" + volId); GTEST_LOG_(INFO) << "Storage_Service_VolumeInfoTest_Mount_004 end"; } @@ -319,7 +319,7 @@ HWTEST_F(VolumeInfoTest, Storage_Service_ExternalVolumeInfoTest_UMount_002, Test ret = mock.UMount(force); EXPECT_TRUE(ret == E_OK); - StorageTestUtils::RmDirRecurse("/mnt/external/" + volId); + StorageTestUtils::RmDirRecurse("/mnt/data/external/" + volId); GTEST_LOG_(INFO) << "Storage_Service_ExternalVolumeInfoTest_UMount_002 end"; } @@ -353,7 +353,7 @@ HWTEST_F(VolumeInfoTest, Storage_Service_ExternalVolumeInfoTest_UMount_003, Test ret = mock.UMount(force); EXPECT_TRUE(ret == E_OK); - StorageTestUtils::RmDirRecurse("/mnt/external/" + volId); + StorageTestUtils::RmDirRecurse("/mnt/data/external/" + volId); GTEST_LOG_(INFO) << "Storage_Service_ExternalVolumeInfoTest_UMount_003 end"; } @@ -388,7 +388,7 @@ HWTEST_F(VolumeInfoTest, Storage_Service_ExternalVolumeInfoTest_UMount_004, Test ret = mock.UMount(force); EXPECT_TRUE(ret == E_ERR); - StorageTestUtils::RmDirRecurse("/mnt/external/" + volId); + StorageTestUtils::RmDirRecurse("/mnt/data/external/" + volId); GTEST_LOG_(INFO) << "Storage_Service_ExternalVolumeInfoTest_UMount_004 end"; }