From 6ed824c396181ceb1f178e1d3c562d72392ea19c Mon Sep 17 00:00:00 2001 From: zhuofan0129 <861080528@qq.com> Date: Fri, 5 Sep 2025 18:32:59 +0800 Subject: [PATCH] feat: add hidumper info Signed-off-by: zhuofan0129 <861080528@qq.com> --- services/sa/standard/dslm_service.cpp | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/services/sa/standard/dslm_service.cpp b/services/sa/standard/dslm_service.cpp index a3f9c77..7cb8600 100644 --- a/services/sa/standard/dslm_service.cpp +++ b/services/sa/standard/dslm_service.cpp @@ -21,6 +21,7 @@ #include "iremote_object.h" #include "singleton.h" #include "utils_log.h" +#include "string_ex.h" #include "device_security_defines.h" #include "dslm_hidumper.h" @@ -61,7 +62,22 @@ void DslmService::OnStop() int32_t DslmService::Dump(int fd, const std::vector &args) { - DslmDumper(fd); + dprintf(fd, "Dslm Dump:\n"); + if (args.size() == 0) { + dprintf(fd, "please use hidumper -s said -a -h command help\n"); + return 0; + } + std::string arg0 = Str16ToStr8(args.at(0)); + if (arg0.compare("-h") == 0) { + dprintf(fd, "Usage:\n"); + dprintf(fd, " -h: command help\n"); + dprintf(fd, " -l: dump all device\n"); + } else if (arg0.compare("-l") == 0) { + DslmDumper(fd); + } else { + dprintf(fd, "please use hidumper -s said -a -h command help\n"); + } + return 0; } -- Gitee