diff options
author | Dmitry Safonov <dsafonov@virtuozzo.com> | 2016-07-01 18:37:00 +0300 |
---|---|---|
committer | Pavel Emelyanov <xemul@virtuozzo.com> | 2016-07-07 12:39:20 +0300 |
commit | fa437b6576bc79c04b57fa0cac66a9dc3de598e6 (patch) | |
tree | 998f7c7d3dd2c0c4ac453fbfe604f93c47f7d419 /criu/pie/piegen | |
parent | 5c89cc03f227df7d5224e54e3fefaa6605808277 (diff) |
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 <dsafonov@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Diffstat (limited to 'criu/pie/piegen')
-rw-r--r-- | criu/pie/piegen/elf.c | 2 |
1 files changed, 1 insertions, 1 deletions
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"); |