From 513260ef445cf7211d642738724576ea72bd738b Mon Sep 17 00:00:00 2001 From: lwx1210331 Date: Tue, 28 Feb 2023 17:16:19 +0800 Subject: [PATCH] modify by kuanghong Signed-off-by: lwx1210331 --- services/flashd/BUILD.gn | 7 +++---- utils/write_updater.cpp | 7 +++---- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/services/flashd/BUILD.gn b/services/flashd/BUILD.gn index 8f37f8a1..f38b79b3 100755 --- a/services/flashd/BUILD.gn +++ b/services/flashd/BUILD.gn @@ -79,7 +79,7 @@ ohos_source_set("flashd_deamon") { "//base/update/updater/services/flashd/daemon", "//base/update/updater/services/flashd/common", "//base/update/updater/services/flashd/host", - "//utils/native/base/include", + "//third_party/bounds_checking_function/include", "//third_party/lz4/lib", "//third_party/openssl/include", "//third_party/libuv", @@ -141,7 +141,6 @@ ohos_static_library("libflashd") { "//third_party/bounds_checking_function/include", "//third_party/cJSON", "//third_party/openssl/include", - "//utils/native/base/include", "//third_party/lz4/lib", "//third_party/libuv", ] @@ -182,11 +181,11 @@ ohos_executable("ohflash") { sources += common_sources deps = [ + "//third_party/bounds_checking_function:libsec_static", "//third_party/libusb:libusb", "//third_party/libuv:uv_static", "//third_party/lz4:liblz4_static", "//third_party/openssl:libcrypto_static", - "//utils/native/base:utilsecurec", ] deps += [ "//third_party/libusb:libusb" ] @@ -196,7 +195,7 @@ ohos_executable("ohflash") { "${HDC_PATH}/host", "${FLASHD_PATH}/common", "${HDC_PATH}/common", - "//utils/native/base/include", + "//third_party/bounds_checking_function/include", "//third_party/lz4/lib", "//third_party/openssl/include", "//third_party/libuv", diff --git a/utils/write_updater.cpp b/utils/write_updater.cpp index e2555e13..019cd4e4 100644 --- a/utils/write_updater.cpp +++ b/utils/write_updater.cpp @@ -31,7 +31,6 @@ int main(int argc, char **argv) return -1; } - const std::string miscFile = "dev/block/by-name/misc"; if (strcmp(argv[1], "updater") == 0) { struct UpdateMessage boot {}; if (argv[WRITE_SECOND_CMD] != nullptr) { @@ -41,7 +40,7 @@ int main(int argc, char **argv) return -1; } } - bool ret = WriteUpdaterMessage(miscFile, boot); + bool ret = WriteUpdaterMessage(MISC_FILE, boot); if (!ret) { cout << "WriteUpdaterMessage failed!" << endl; return -1; @@ -52,14 +51,14 @@ int main(int argc, char **argv) cout << "strncpy_s failed!" << endl; return -1; } - bool ret = WriteUpdaterMessage(miscFile, boot); + bool ret = WriteUpdaterMessage(MISC_FILE, boot); if (!ret) { cout << "WriteUpdaterMessage failed!" << endl; return -1; } } else if (strcmp(argv[1], "clear") == 0) { struct UpdateMessage boot {}; - bool ret = WriteUpdaterMessage(miscFile, boot); + bool ret = WriteUpdaterMessage(MISC_FILE, boot); if (!ret) { cout << "WriteUpdaterMessage failed!" << endl; return -1; -- Gitee