From fa437b6576bc79c04b57fa0cac66a9dc3de598e6 Mon Sep 17 00:00:00 2001 From: Dmitry Safonov Date: Fri, 1 Jul 2016 18:37:00 +0300 Subject: criu-print: use %# to print hex values w/ width specified If we print "0x" with width specifier, it may go away which is not nice: (00.005258) 21858 fdinfo 0: pos: 0x 0 flags: 100002/0 (00.004589) Collected: ino 0x 51fd family 2 type 1 port 64000 state 10 src_addr 0.0.0.0 This patch is generated with the following sed one-liner: find ./* -type f -print0 | xargs -0 sed -i '/pr.*/s/0x%\([0-9]\+\)/%#\1/g' Don't know if we should change all 0x%*anything* printing to %#*anything*, but where we use field width I think we should. Impact: Just bothered by eyes, cleanup. Signed-off-by: Dmitry Safonov Signed-off-by: Pavel Emelyanov --- criu/pie/piegen/elf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'criu/pie/piegen/elf.c') diff --git a/criu/pie/piegen/elf.c b/criu/pie/piegen/elf.c index c6b97257b..e43d8436f 100644 --- a/criu/pie/piegen/elf.c +++ b/criu/pie/piegen/elf.c @@ -500,7 +500,7 @@ int handle_elf(void *mem, size_t size) for (j=0; j < sh->sh_size; j++, k++) { if (k && (k % 8) == 0) pr_out("\n\t"); - pr_out("0x%02x,", shdata[j]); + pr_out("%#02x,", shdata[j]); } } pr_out("};\n"); -- cgit v1.2.3