* Use parse_expression() instead of strtoul().

* "owner count" contained an extra tab.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31951 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2009-07-29 23:01:27 +00:00
parent 7c06546a8e
commit ca39f8d89f
+7 -5
View File
@@ -1,13 +1,15 @@
/* /*
* Copyright 2008, Ingo Weinhold, [email protected]. * Copyright 2008, Ingo Weinhold, [email protected].
* Copyright 2002-2008, Axel Dörfler, [email protected]. All rights reserved. * Copyright 2002-2009, Axel Dörfler, [email protected]. All rights reserved.
* Distributed under the terms of the MIT License. * Distributed under the terms of the MIT License.
* *
* Copyright 2001-2002, Travis Geiselbrecht. All rights reserved. * Copyright 2001-2002, Travis Geiselbrecht. All rights reserved.
* Distributed under the terms of the NewOS License. * Distributed under the terms of the NewOS License.
*/ */
/* Mutex and recursive_lock code */
/*! Mutex and recursive_lock code */
#include <lock.h> #include <lock.h>
@@ -390,7 +392,7 @@ dump_rw_lock_info(int argc, char** argv)
return 0; return 0;
} }
rw_lock* lock = (rw_lock*)strtoul(argv[1], NULL, 0); rw_lock* lock = (rw_lock*)parse_expression(argv[1]);
if (!IS_KERNEL_ADDRESS(lock)) { if (!IS_KERNEL_ADDRESS(lock)) {
kprintf("invalid address: %p\n", lock); kprintf("invalid address: %p\n", lock);
@@ -402,7 +404,7 @@ dump_rw_lock_info(int argc, char** argv)
kprintf(" holder: %ld\n", lock->holder); kprintf(" holder: %ld\n", lock->holder);
kprintf(" reader count: %ld\n", lock->reader_count); kprintf(" reader count: %ld\n", lock->reader_count);
kprintf(" writer count: %ld\n", lock->writer_count); kprintf(" writer count: %ld\n", lock->writer_count);
kprintf(" owner count: %ld\n", lock->owner_count); kprintf(" owner count: %ld\n", lock->owner_count);
kprintf(" flags: %#lx\n", lock->flags); kprintf(" flags: %#lx\n", lock->flags);
kprintf(" waiting threads:"); kprintf(" waiting threads:");
@@ -626,7 +628,7 @@ dump_mutex_info(int argc, char** argv)
return 0; return 0;
} }
mutex* lock = (mutex*)strtoul(argv[1], NULL, 0); mutex* lock = (mutex*)parse_expression(argv[1]);
if (!IS_KERNEL_ADDRESS(lock)) { if (!IS_KERNEL_ADDRESS(lock)) {
kprintf("invalid address: %p\n", lock); kprintf("invalid address: %p\n", lock);