From 4dcfb5e71b9c3dbe51927c150eba66ccf7db04b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E6=96=87=E8=BF=AA?= Date: Wed, 29 Mar 2023 04:08:15 +0000 Subject: [PATCH] =?UTF-8?q?=E5=9B=9E=E9=80=80=20'Pull=20Request=20!496=20:?= =?UTF-8?q?=20=E5=9B=9E=E9=80=80=20'Pull=20Request=20!493=20:=20add=20=20s?= =?UTF-8?q?ysparam=20dac''?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- OAT.xml | 2 ++ bundle.json | 2 +- services/storage_daemon/BUILD.gn | 14 ++++++++++++++ services/storage_daemon/usb_config.para | 3 +-- services/storage_daemon/usb_config.para.dac | 1 + services/storage_daemon/volume/src/volume_info.cpp | 2 +- 6 files changed, 20 insertions(+), 4 deletions(-) create mode 100644 services/storage_daemon/usb_config.para.dac diff --git a/OAT.xml b/OAT.xml index 020f546a..7583994c 100644 --- a/OAT.xml +++ b/OAT.xml @@ -63,9 +63,11 @@ Note:If the text contains special characters, please escape them according to th + + diff --git a/bundle.json b/bundle.json index 209af15f..ab11ddbc 100644 --- a/bundle.json +++ b/bundle.json @@ -56,7 +56,7 @@ "//foundation/filemanagement/storage_service/services/storage_daemon:storage_daemon", "//foundation/filemanagement/storage_service/services/storage_daemon:storage_daemon_cfg", "//foundation/filemanagement/storage_service/services/storage_daemon:storage_daemon_disk_config", - "//foundation/filemanagement/storage_service/services/storage_daemon:usb_config.para", + "//foundation/filemanagement/storage_service/services/storage_daemon:storage_daemon_usb_param", "//foundation/filemanagement/storage_service/services/storage_daemon:storage_daemon_third_party", "//foundation/filemanagement/storage_service/services/storage_manager/sa_profile:storage_manager_sa_profile", "//foundation/filemanagement/storage_service/services/storage_manager/sa_profile:storage_manager_cfg", diff --git a/services/storage_daemon/BUILD.gn b/services/storage_daemon/BUILD.gn index 3875f86f..0a318b4c 100644 --- a/services/storage_daemon/BUILD.gn +++ b/services/storage_daemon/BUILD.gn @@ -220,6 +220,20 @@ ohos_prebuilt_etc("usb_config.para") { module_install_dir = "etc/param" } +ohos_prebuilt_etc("usb_config.para.dac") { + source = "usb_config.para.dac" + part_name = "storage_service" + subsystem_name = "filemanagement" + module_install_dir = "etc/param" +} + +group("storage_daemon_usb_param") { + deps = [ + ":usb_config.para", + ":usb_config.para.dac", + ] +} + group("storage_daemon_third_party") { deps = [] if (storage_service_fstools) { diff --git a/services/storage_daemon/usb_config.para b/services/storage_daemon/usb_config.para index 0750eb4c..b559bf45 100644 --- a/services/storage_daemon/usb_config.para +++ b/services/storage_daemon/usb_config.para @@ -11,5 +11,4 @@ # See the License for the specific language governing permissions and # limitations under the License. - -usb.readonly = false \ No newline at end of file +persist.filemanagement.usb.readonly = false \ No newline at end of file diff --git a/services/storage_daemon/usb_config.para.dac b/services/storage_daemon/usb_config.para.dac new file mode 100644 index 00000000..24bab9f8 --- /dev/null +++ b/services/storage_daemon/usb_config.para.dac @@ -0,0 +1 @@ +persist.filemanagement.usb.readonly = edm:edm:0776 \ No newline at end of file diff --git a/services/storage_daemon/volume/src/volume_info.cpp b/services/storage_daemon/volume/src/volume_info.cpp index a8990612..6405988f 100644 --- a/services/storage_daemon/volume/src/volume_info.cpp +++ b/services/storage_daemon/volume/src/volume_info.cpp @@ -35,7 +35,7 @@ int32_t VolumeInfo::Create(const std::string volId, const std::string diskId, de mountFlags_ = 0; userIdOwner_ = 0; - std::string key = "usb.readonly"; + std::string key = "persist.filemanagement.usb.readonly"; int handle = static_cast(FindParameter(key.c_str())); if (handle != -1) { char rdOnlyEnable[255] = {"false"};