* If the "traced" KDL command is used with only one argument, it's the index

now, not the number of entries shown (much more usable this way).
* Added missing license.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23520 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2008-01-14 14:04:35 +00:00
parent 4653aacfb7
commit 2d81f04529

View File

@ -1,9 +1,16 @@
/*
* Copyright 2008, Ingo Weinhold, ingo_weinhold@gmx.de.
* Copyright 2008, Axel Dörfler, axeld@pinc-software.de.
* Distributed under the terms of the MIT License.
*/
#include <tracing.h>
#include <util/AutoLock.h>
#include <stdlib.h>
#include <util/AutoLock.h>
#if ENABLE_TRACING
@ -179,11 +186,11 @@ dump_tracing(int argc, char** argv)
pattern = argv[--argc] + 1;
int32 count = 30;
if (argc == 2)
count = strtol(argv[1], NULL, 0);
int32 start = sEntries - count;
if (argc == 2)
start = strtol(argv[1], NULL, 0);
if (argc == 3) {
start = strtol(argv[1], NULL, 0);
count = strtol(argv[2], NULL, 0);
@ -238,6 +245,7 @@ dump_tracing(int argc, char** argv)
#endif // ENABLE_TRACING
extern "C" uint8*
alloc_tracing_buffer(size_t size)
{