diff options
author | Vladimir Sementsov-Ogievskiy | 2017-07-31 18:01:33 +0200 |
---|---|---|
committer | Stefan Hajnoczi | 2017-08-01 13:13:07 +0200 |
commit | db73ee4bc8861f9f6772e0d24f978d79e50e8dee (patch) | |
tree | cabe63c321e4cde60657e1c56018906f86fb3359 /audio/trace-events | |
parent | coding_style: add point about 0x in trace-events (diff) | |
download | qemu-db73ee4bc8861f9f6772e0d24f978d79e50e8dee.tar.gz qemu-db73ee4bc8861f9f6772e0d24f978d79e50e8dee.tar.xz qemu-db73ee4bc8861f9f6772e0d24f978d79e50e8dee.zip |
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>
Diffstat (limited to 'audio/trace-events')
-rw-r--r-- | audio/trace-events | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/audio/trace-events b/audio/trace-events index 122604287f..d37639e611 100644 --- a/audio/trace-events +++ b/audio/trace-events @@ -3,7 +3,7 @@ # audio/alsaaudio.c alsa_revents(int revents) "revents = %d" alsa_pollout(int i, int fd) "i = %d fd = %d" -alsa_set_handler(int events, int index, int fd, int err) "events=%#x index=%d fd=%d err=%d" +alsa_set_handler(int events, int index, int fd, int err) "events=0x%x index=%d fd=%d err=%d" alsa_wrote_zero(int len) "Failed to write %d frames (wrote zero)" alsa_read_zero(long len) "Failed to read %ld frames (read zero)" alsa_xrun_out(void) "Recovering from playback xrun" @@ -13,5 +13,5 @@ alsa_resume_in(void) "Resuming suspended input stream" alsa_no_frames(int state) "No frames available and ALSA state is %d" # audio/ossaudio.c -oss_version(int version) "OSS version = %#x" +oss_version(int version) "OSS version = 0x%x" oss_invalid_available_size(int size, int bufsize) "Invalid available size, size=%d bufsize=%d" |