* Used add_debugger_command_etc() and added a usage text for "team" and
"teams". * "team" without arg prints info about the current team. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23746 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -313,8 +313,12 @@ dump_team_info(int argc, char **argv)
|
|||||||
team_id id = -1;
|
team_id id = -1;
|
||||||
bool found = false;
|
bool found = false;
|
||||||
|
|
||||||
if (argc != 2) {
|
if (argc < 2) {
|
||||||
kprintf("usage: team [id/address/name]\n");
|
struct thread* thread = thread_get_current_thread();
|
||||||
|
if (thread != NULL && thread->team != NULL)
|
||||||
|
_dump_team_info(thread->team);
|
||||||
|
else
|
||||||
|
kprintf("No current team!\n");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1838,8 +1842,17 @@ team_init(kernel_args *args)
|
|||||||
// stick it in the team hash
|
// stick it in the team hash
|
||||||
hash_insert(sTeamHash, sKernelTeam);
|
hash_insert(sTeamHash, sKernelTeam);
|
||||||
|
|
||||||
add_debugger_command("team", &dump_team_info, "list info about a particular team");
|
add_debugger_command_etc("team", &dump_team_info,
|
||||||
add_debugger_command("teams", &dump_teams, "list all teams");
|
"Dump info about a particular team",
|
||||||
|
"[ <id> | <address> | <name> ]\n"
|
||||||
|
"Prints information about the specified team. If no argument is given\n"
|
||||||
|
"the current team is selected.\n"
|
||||||
|
" <id> - The ID of the team.\n"
|
||||||
|
" <address> - The address of the team structure.\n"
|
||||||
|
" <name> - The team's name.\n", 0);
|
||||||
|
add_debugger_command_etc("teams", &dump_teams, "List all teams",
|
||||||
|
"\n"
|
||||||
|
"Prints a list of all existing teams.\n", 0);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user