]> git.proxmox.com Git - mirror_qemu.git/commit - block/trace-events
trace-events: fix code style: %# -> 0x%
authorVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Mon, 31 Jul 2017 16:01:33 +0000 (19:01 +0300)
committerStefan Hajnoczi <stefanha@redhat.com>
Tue, 1 Aug 2017 11:13:07 +0000 (12:13 +0100)
commitdb73ee4bc8861f9f6772e0d24f978d79e50e8dee
treecabe63c321e4cde60657e1c56018906f86fb3359
parent44c6d6387b6a80ee1645b1b5cd5e2749f5596ca7
trace-events: fix code style: %# -> 0x%

In trace format '#' flag of printf is forbidden. Fix it to '0x%'.

This patch is created by the following:

check that we have a problem
> find . -name trace-events | xargs grep '%#' | wc -l
56

check that there are no cases with additional printf flags before '#'
> find . -name trace-events | xargs grep "%[-+ 0'I]+#" | wc -l
0

check that there are no wrong usage of '#' and '0x' together
> find . -name trace-events | xargs grep '0x%#' | wc -l
0

fix the problem
> find . -name trace-events | xargs sed -i 's/%#/0x%/g'

[Eric Blake noted that xargs grep '%[-+ 0'I]+#' should be xargs grep
"%[-+ 0'I]+#" instead so the shell quoting is correct.
--Stefan]

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-id: 20170731160135.12101-3-vsementsov@virtuozzo.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
audio/trace-events
block/trace-events
hw/display/trace-events
hw/i386/xen/trace-events
hw/input/trace-events
hw/intc/trace-events
hw/net/trace-events
hw/pci/trace-events
hw/scsi/trace-events
hw/xen/trace-events
trace-events