From fd00873b1935e950bf0c7165bd0755ea35255ef2 Mon Sep 17 00:00:00 2001 From: wangzhaohao Date: Fri, 29 Aug 2025 15:32:57 +0800 Subject: [PATCH] =?UTF-8?q?hidumper=E5=8F=82=E6=95=B0=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: wangzhaohao --- services/core/src/dfx/device_profile_dumper.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/services/core/src/dfx/device_profile_dumper.cpp b/services/core/src/dfx/device_profile_dumper.cpp index 1903d6e9..18301793 100644 --- a/services/core/src/dfx/device_profile_dumper.cpp +++ b/services/core/src/dfx/device_profile_dumper.cpp @@ -22,7 +22,8 @@ namespace OHOS { namespace DistributedDeviceProfile { namespace { constexpr size_t MIN_ARGS_SIZE = 1; -const std::string ARGS_HELP = "-h"; +const std::string ARGS_H = "-h"; +const std::string ARGS_HELP = "-help"; const std::string TAG = "DeviceProfileDumper"; constexpr int32_t UID_HIDUMPER = 1212; } @@ -47,11 +48,16 @@ bool DeviceProfileDumper::Dump(const std::vector& args, std::string } if (args.size() == MIN_ARGS_SIZE) { - // -h + // -help if (args[0] == ARGS_HELP) { ShowHelp(result); return true; } + // -h + if (args[0] == ARGS_H) { + ShowHelp(result); + return true; + } } IllegalInput(result); return false; -- Gitee