fuzz: Display hexadecimal value with '0x' prefix
PATCH 1/1 fuzz: Display hexadecimal value with '0x' prefix
Signed-off-by Philippe Mathieu-Daudé <[email protected]>
--- tests/qtest/fuzz/generic_fuzz.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tests/qtest/fuzz/generic_fuzz.c +1 -1
@@ -841,7 +841,7 @@ static void generic_pre_fuzz(QTestState *s)g_hash_table_iter_init (&iter, fuzzable_memoryregions);while (g_hash_table_iter_next (&iter, (gpointer)&mr,NULL )) { -printf (" * %s (size %lx)\n" , +printf (" * %s (size 0x%lx)\n" ,object_get_canonical_path_component (&(mr->parent_obj)), (uint64_t )mr->size); }
Signature · 1 line
2.31.1
Le 12/06/2021 à 17:00, Philippe Mathieu-Daudé a écrit :
Quoted 11 lines
Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- tests/qtest/fuzz/generic_fuzz.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)tests/qtest/fuzz/generic_fuzz.c +0
-0
tests/qtest/fuzz/generic_fuzz.c static void generic_pre_fuzz(QTestState *s) · line 847
Quoted 8 lines
tests/qtest/fuzz/generic_fuzz.c +1
-1@@ -841,7 +841,7 @@ static void generic_pre_fuzz(QTestState *s)g_hash_table_iter_init (&iter, fuzzable_memoryregions);while (g_hash_table_iter_next (&iter, (gpointer)&mr,NULL )) { -printf (" * %s (size %lx)\n" , +printf (" * %s (size 0x%lx)\n" ,object_get_canonical_path_component (&(mr->parent_obj)), (uint64_t )mr->size); }
What about a "0x%"PRIx64 ?
Thanks,
Laurent
Quoted 13 lines · Laurent Vivier
Quoted 11 lines · Philippe Mathieu-Daudé
Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- tests/qtest/fuzz/generic_fuzz.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)tests/qtest/fuzz/generic_fuzz.c +0
-0@@ -841,7 +841,7 @@ static void generic_pre_fuzz(QTestState *s)
Quoted 10 lines
tests/qtest/fuzz/generic_fuzz.c static void generic_pre_fuzz(QTestState *s) · line 847
Quoted 8 lines
tests/qtest/fuzz/generic_fuzz.c +1
-1g_hash_table_iter_init (&iter, fuzzable_memoryregions);while (g_hash_table_iter_next (&iter, (gpointer)&mr,NULL )) { -printf (" * %s (size %lx)\n" , +printf (" * %s (size 0x%lx)\n" ,object_get_canonical_path_component (&(mr->parent_obj)), (uint64_t )mr->size); }What about a "0x%"PRIx64 ?
Ah, I only looked at the format. Even better: also use memory_region_size().