projects
/
qemu-gpiodev
/
libgpiod.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ef67e45
)
gpiomon: fix parsing of custom output formats
author
Bartosz Golaszewski
<bartekgola@gmail.com>
Tue, 20 Jun 2017 18:03:33 +0000
(20:03 +0200)
committer
Bartosz Golaszewski
<bartekgola@gmail.com>
Tue, 20 Jun 2017 18:03:33 +0000
(20:03 +0200)
The '%%e' string should be printed as '%e' - the same as for printf()
format specifiers - but gpiomon prints '%%e' in this case. Fix it.
Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com>
src/tools/gpiomon.c
patch
|
blob
|
history
diff --git
a/src/tools/gpiomon.c
b/src/tools/gpiomon.c
index b54ee2ba9bb22a0bb50b8ca560e507a77a849e24..10b07d9a3440413c8332c72e356db812b9f17f05 100644
(file)
--- a/
src/tools/gpiomon.c
+++ b/
src/tools/gpiomon.c
@@
-123,7
+123,8
@@
static void event_print_custom(int type, const struct timespec *ts,
off = pos - str;
if (fmt == '%') {
- off += 2;
+ memmove(str + off, str + off + 1, strlen(str) - off);
+ off += 1;
continue;
}