OSDN Git Service
(root)
/
android-x86
/
external-toybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9398f05
)
Fix dmesg -c error output.
author
Elliott Hughes
<enh@google.com>
Sun, 3 May 2015 21:25:09 +0000
(16:25 -0500)
committer
Rob Landley
<rob@landley.net>
Sun, 3 May 2015 21:25:09 +0000
(16:25 -0500)
Use perror_exit to show the likely "Operation not permitted" if klogctl fails.
toys/lsb/dmesg.c
patch
|
blob
|
history
diff --git
a/toys/lsb/dmesg.c
b/toys/lsb/dmesg.c
index
aac638d
..
d608446
100644
(file)
--- a/
toys/lsb/dmesg.c
+++ b/
toys/lsb/dmesg.c
@@
-45,7
+45,7
@@
void dmesg_main(void)
if (!size && 1>(size = klogctl(10, 0, 0))) perror_exit("klogctl");;
data = to = from = xmalloc(size+1);
size = klogctl(3 + (toys.optflags & FLAG_c), data, size);
- if (size < 0) error_exit("klogctl");
+ if (size < 0)
p
error_exit("klogctl");
data[size] = 0;
// Filter out level markers and optionally time markers