* 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:
@@ -589,8 +589,8 @@ cmd_shutdown(int argc, char **argv)
|
|||||||
static int
|
static int
|
||||||
cmd_help(int argc, char **argv)
|
cmd_help(int argc, char **argv)
|
||||||
{
|
{
|
||||||
static const char* usage = "usage: %s\n"
|
static const char* usage = "usage: %s [name]\n"
|
||||||
"Lists all debugger commands.\n";
|
"Lists all debugger commands or those starting with \"name\".\n";
|
||||||
if (argc > 1 && strcmp(argv[1], "--help") == 0) {
|
if (argc > 1 && strcmp(argv[1], "--help") == 0) {
|
||||||
kprintf(usage, argv[0]);
|
kprintf(usage, argv[0]);
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
@@ -626,9 +626,9 @@ ExpressionParser::_ParseCommand(int& returnCode)
|
|||||||
if (command == NULL) {
|
if (command == NULL) {
|
||||||
if (ambiguous) {
|
if (ambiguous) {
|
||||||
snprintf(sTempBuffer, sizeof(sTempBuffer),
|
snprintf(sTempBuffer, sizeof(sTempBuffer),
|
||||||
"Ambiguous command \"%s\". Use tab "
|
"Ambiguous command \"%s\". Use tab completion or enter "
|
||||||
"completion to get a list of matching commands. Enter \"help\" "
|
"\"help %s\" get a list of matching commands.\n", token.string,
|
||||||
"to get a list of all supported commands.\n", token.string);
|
token.string);
|
||||||
} else {
|
} else {
|
||||||
snprintf(sTempBuffer, sizeof(sTempBuffer),
|
snprintf(sTempBuffer, sizeof(sTempBuffer),
|
||||||
"Unknown command \"%s\". Enter \"help\" to get a list of "
|
"Unknown command \"%s\". Enter \"help\" to get a list of "
|
||||||
|
|||||||
@@ -2442,15 +2442,13 @@ dump_vnode(int argc, char **argv)
|
|||||||
static int
|
static int
|
||||||
dump_vnodes(int argc, char **argv)
|
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]);
|
kprintf("usage: %s [device]\n", argv[0]);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// restrict dumped nodes to a certain device if requested
|
// restrict dumped nodes to a certain device if requested
|
||||||
dev_t device = -1;
|
dev_t device = parse_expression(argv[1]);
|
||||||
if (argc > 1)
|
|
||||||
device = parse_expression(argv[1]);
|
|
||||||
|
|
||||||
struct hash_iterator iterator;
|
struct hash_iterator iterator;
|
||||||
struct vnode *vnode;
|
struct vnode *vnode;
|
||||||
@@ -2460,7 +2458,7 @@ dump_vnodes(int argc, char **argv)
|
|||||||
|
|
||||||
hash_open(sVnodeTable, &iterator);
|
hash_open(sVnodeTable, &iterator);
|
||||||
while ((vnode = (struct vnode *)hash_next(sVnodeTable, &iterator)) != NULL) {
|
while ((vnode = (struct vnode *)hash_next(sVnodeTable, &iterator)) != NULL) {
|
||||||
if (device != -1 && vnode->device != device)
|
if (vnode->device != device)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
kprintf("%p%4ld%10Ld%5ld %p %p %p %s%s%s\n", vnode, vnode->device,
|
kprintf("%p%4ld%10Ld%5ld %p %p %p %s%s%s\n", vnode, vnode->device,
|
||||||
|
|||||||
Reference in New Issue
Block a user