diff --git a/services/core/src/dfx/device_profile_dumper.cpp b/services/core/src/dfx/device_profile_dumper.cpp index 1903d6e9b264a0a8268d53e1ffd6e06407adcdf6..18301793c0406bfaf2895c52e6c1da4ea2ad36e3 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;