mirror of
https://gitee.com/openharmony/developtools_hiperf
synced 2025-02-18 15:20:56 +00:00
judge developer mode except hiview
Change-Id: Id641097afa0e4c4b2063f2b59e33bab1ac8c188b Signed-off-by: leiguangyu <leiguangyu@huawei.com>
This commit is contained in:
parent
fb2085d678
commit
8f95690103
10
src/main.cpp
10
src/main.cpp
@ -42,7 +42,7 @@ using namespace OHOS::Developtools::HiPerf;
|
||||
|
||||
int main(const int argc, const char *argv[])
|
||||
{
|
||||
if (!GetDeveloperMode()) {
|
||||
if (!IsAllowProfilingUid() && !GetDeveloperMode()) {
|
||||
printf("error: not in developermode, exit");
|
||||
return -1;
|
||||
}
|
||||
@ -68,6 +68,14 @@ int main(const int argc, const char *argv[])
|
||||
args.push_back(argv[i]);
|
||||
}
|
||||
|
||||
|
||||
if (!GetDeveloperMode()) {
|
||||
if (find(args.begin(), args.end(), "record") == args.end() ||
|
||||
find(args.begin(), args.end(), "--pipe_output") == args.end())
|
||||
printf("error: not in developermode, exit");
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (args.empty()) {
|
||||
printf("no command input.\n");
|
||||
args.push_back("help"); // no cmd like help cmd
|
||||
|
Loading…
x
Reference in New Issue
Block a user