mirror of
https://gitee.com/openharmony/startup_init
synced 2024-11-24 00:30:12 +00:00
!2485 fix:repair dump service crash
Merge pull request !2485 from liveery/master
This commit is contained in:
commit
64115ca93e
@ -101,7 +101,8 @@ static void DumpOneService(const Service *service)
|
||||
|
||||
printf("\tservice name: [%s] \n", service->name);
|
||||
printf("\tservice pid: [%d] \n", service->pid);
|
||||
if (service->lastErrno < sizeof(initErrMaps)) {
|
||||
int tmpCount = sizeof(initErrMaps) / sizeof(initErrMaps[0]);
|
||||
if (service->lastErrno < tmpCount) {
|
||||
printf("\tservice last error: %s(%d) \n", initErrMaps[service->lastErrno].info, service->lastErrno);
|
||||
} else {
|
||||
printf("\tservice last error: %d \n", service->lastErrno);
|
||||
|
Loading…
Reference in New Issue
Block a user