[PATCH] When using Brent algo for list command, print loop length in decimal.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Probably the loop length should be printed in decimal rather than hex.

Example of output today:
crash> list -B -r 0xffff88e4906ea390 | wc
list: loop detected, loop length: 3c7
list: length from start to loop: 3
list: duplicate list entry: ffffffff819c1890
   1993    2008   33948
crash> pd 0x3c7
$5 = 967

Example of new output:
crash> list -B -r 0xffff88e4906ea390 | wc
list: loop detected, loop length: 967
list: length from start to loop: 3
list: duplicate list entry: ffffffff819c1890
   1993    2008   33948

Signed-off-by: Dave Wysochanski <dwysocha@xxxxxxxxxx>
---
 tools.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools.c b/tools.c
index 43b838a..eceea90 100644
--- a/tools.c
+++ b/tools.c
@@ -4086,7 +4086,7 @@ do_list_no_hash(struct list_data *ld)
 		if (!brent_loop_detect) {
 			if (brent_x == brent_y) {
 				brent_loop_detect = 1;
-				error(INFO, "loop detected, loop length: %lx\n", brent_lambda);
+				error(INFO, "loop detected, loop length: %ld\n", brent_lambda);
 				/* reset x and y to start; advance y loop length */
 				brent_mu = 0;
 				brent_x = brent_y = ld->start;
-- 
1.8.3.1

--
Crash-utility mailing list
Crash-utility@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/crash-utility



[Index of Archives]     [Fedora Development]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]     [Fedora Tools]

 

Powered by Linux