diff --git a/src/system/kernel/debug/debug.cpp b/src/system/kernel/debug/debug.cpp index f210c5a999..37c1744c3b 100644 --- a/src/system/kernel/debug/debug.cpp +++ b/src/system/kernel/debug/debug.cpp @@ -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; diff --git a/src/system/kernel/debug/debug_parser.cpp b/src/system/kernel/debug/debug_parser.cpp index 19caf52b5e..383e209e37 100644 --- a/src/system/kernel/debug/debug_parser.cpp +++ b/src/system/kernel/debug/debug_parser.cpp @@ -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 " diff --git a/src/system/kernel/fs/vfs.cpp b/src/system/kernel/fs/vfs.cpp index 24f54b9370..04659f1fbb 100644 --- a/src/system/kernel/fs/vfs.cpp +++ b/src/system/kernel/fs/vfs.cpp @@ -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,