* Fixed the "vnodes" KDL command when called without any arguments.
* Fixed the usage text of the "help" KDL command. * Made the "ambiguous command" warning shorter, so that it will still fit in the exception buffer. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23565 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
c6ee79ce38
commit
b9074efcb7
@ -589,8 +589,8 @@ cmd_shutdown(int argc, char **argv)
|
||||
static int
|
||||
cmd_help(int argc, char **argv)
|
||||
{
|
||||
static const char* usage = "usage: %s\n"
|
||||
"Lists all debugger commands.\n";
|
||||
static const char* usage = "usage: %s [name]\n"
|
||||
"Lists all debugger commands or those starting with \"name\".\n";
|
||||
if (argc > 1 && strcmp(argv[1], "--help") == 0) {
|
||||
kprintf(usage, argv[0]);
|
||||
return 0;
|
||||
|
@ -626,9 +626,9 @@ ExpressionParser::_ParseCommand(int& returnCode)
|
||||
if (command == NULL) {
|
||||
if (ambiguous) {
|
||||
snprintf(sTempBuffer, sizeof(sTempBuffer),
|
||||
"Ambiguous command \"%s\". Use tab "
|
||||
"completion to get a list of matching commands. Enter \"help\" "
|
||||
"to get a list of all supported commands.\n", token.string);
|
||||
"Ambiguous command \"%s\". Use tab completion or enter "
|
||||
"\"help %s\" get a list of matching commands.\n", token.string,
|
||||
token.string);
|
||||
} else {
|
||||
snprintf(sTempBuffer, sizeof(sTempBuffer),
|
||||
"Unknown command \"%s\". Enter \"help\" to get a list of "
|
||||
|
@ -2442,15 +2442,13 @@ dump_vnode(int argc, char **argv)
|
||||
static int
|
||||
dump_vnodes(int argc, char **argv)
|
||||
{
|
||||
if (argc > 2 || !strcmp(argv[1], "--help")) {
|
||||
if (argc != 2 || !strcmp(argv[1], "--help")) {
|
||||
kprintf("usage: %s [device]\n", argv[0]);
|
||||
return 0;
|
||||
}
|
||||
|
||||
// restrict dumped nodes to a certain device if requested
|
||||
dev_t device = -1;
|
||||
if (argc > 1)
|
||||
device = parse_expression(argv[1]);
|
||||
dev_t device = parse_expression(argv[1]);
|
||||
|
||||
struct hash_iterator iterator;
|
||||
struct vnode *vnode;
|
||||
@ -2460,7 +2458,7 @@ dump_vnodes(int argc, char **argv)
|
||||
|
||||
hash_open(sVnodeTable, &iterator);
|
||||
while ((vnode = (struct vnode *)hash_next(sVnodeTable, &iterator)) != NULL) {
|
||||
if (device != -1 && vnode->device != device)
|
||||
if (vnode->device != device)
|
||||
continue;
|
||||
|
||||
kprintf("%p%4ld%10Ld%5ld %p %p %p %s%s%s\n", vnode, vnode->device,
|
||||
|
Loading…
x
Reference in New Issue
Block a user