qemu-e2k/hw/char
Vladimir Sementsov-Ogievskiy 8908eb1a4a trace-events: fix code style: print 0x before hex numbers
The only exception are groups of numers separated by symbols
'.', ' ', ':', '/', like 'ab.09.7d'.

This patch is made by the following:

> find . -name trace-events | xargs python script.py

where script.py is the following python script:
=========================
 #!/usr/bin/env python

import sys
import re
import fileinput

rhex = '%[-+ *.0-9]*(?:[hljztL]|ll|hh)?(?:x|X|"\s*PRI[xX][^"]*"?)'
rgroup = re.compile('((?:' + rhex + '[.:/ ])+' + rhex + ')')
rbad = re.compile('(?<!0x)' + rhex)

files = sys.argv[1:]

for fname in files:
    for line in fileinput.input(fname, inplace=True):
        arr = re.split(rgroup, line)
        for i in range(0, len(arr), 2):
            arr[i] = re.sub(rbad, '0x\g<0>', arr[i])

        sys.stdout.write(''.join(arr))
=========================

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Acked-by: Cornelia Huck <cohuck@redhat.com>
Message-id: 20170731160135.12101-5-vsementsov@virtuozzo.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2017-08-01 12:13:07 +01:00
..
bcm2835_aux.c char: add backend hotswap handler 2017-07-14 11:04:33 +02:00
cadence_uart.c char: avoid chardevice direct access 2017-07-14 11:04:33 +02:00
cmsdk-apb-uart.c hw/arm/mps2: Add UARTs 2017-07-17 13:36:08 +01:00
debugcon.c char: avoid chardevice direct access 2017-07-14 11:04:33 +02:00
digic-uart.c char: add backend hotswap handler 2017-07-14 11:04:33 +02:00
escc.c ui: drop altgr and altgr_r QKeyCodes 2017-07-27 14:23:33 +02:00
etraxfs_ser.c char: add backend hotswap handler 2017-07-14 11:04:33 +02:00
exynos4210_uart.c char: avoid chardevice direct access 2017-07-14 11:04:33 +02:00
grlib_apbuart.c char: avoid chardevice direct access 2017-07-14 11:04:33 +02:00
imx_serial.c char: add backend hotswap handler 2017-07-14 11:04:33 +02:00
ipoctal232.c char: avoid chardevice direct access 2017-07-14 11:04:33 +02:00
lm32_juart.c char: add backend hotswap handler 2017-07-14 11:04:33 +02:00
lm32_uart.c char: add backend hotswap handler 2017-07-14 11:04:33 +02:00
Makefile.objs hw/char/cmsdk-apb-uart.c: Implement CMSDK APB UART 2017-07-17 13:36:08 +01:00
mcf_uart.c char: add backend hotswap handler 2017-07-14 11:04:33 +02:00
milkymist-uart.c char: add backend hotswap handler 2017-07-14 11:04:33 +02:00
omap_uart.c
parallel.c chardev: fix parallel device can't be reconnect 2017-07-14 12:04:41 +02:00
pl011.c char: add backend hotswap handler 2017-07-14 11:04:33 +02:00
sclpconsole-lm.c char: avoid chardevice direct access 2017-07-14 11:04:33 +02:00
sclpconsole.c char: avoid chardevice direct access 2017-07-14 11:04:33 +02:00
serial-isa.c
serial-pci.c
serial.c serial: chardev hotswap support 2017-07-14 11:04:34 +02:00
sh_serial.c char: avoid chardevice direct access 2017-07-14 11:04:33 +02:00
spapr_vty.c char: avoid chardevice direct access 2017-07-14 11:04:33 +02:00
stm32f2xx_usart.c char: add backend hotswap handler 2017-07-14 11:04:33 +02:00
terminal3270.c char: avoid chardevice direct access 2017-07-14 11:04:33 +02:00
trace-events trace-events: fix code style: print 0x before hex numbers 2017-08-01 12:13:07 +01:00
virtio-console.c virtio-console: chardev hotswap support 2017-07-14 11:04:34 +02:00
virtio-serial-bus.c virtio-serial: fix segfault on disconnect 2017-06-02 18:57:17 +03:00
xen_console.c char: avoid chardevice direct access 2017-07-14 11:04:33 +02:00
xilinx_uartlite.c char: add backend hotswap handler 2017-07-14 11:04:33 +02:00