Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
DISCONTINUED:openSUSE:11.1:Update
busybox
busybox.dmesg-size.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File busybox.dmesg-size.patch of Package busybox
--- util-linux/dmesg.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) --- a/util-linux/dmesg.c +++ b/util-linux/dmesg.c @@ -12,6 +12,14 @@ #include <sys/klog.h> #include "libbb.h" +static int kernel_ringbuffer_size(void) +{ + int len = klogctl(10, NULL, 0); + if (len > 0) + return len; + return 16384; +} + int dmesg_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; int dmesg_main(int argc UNUSED_PARAM, char **argv) { @@ -31,7 +39,7 @@ int dmesg_main(int argc UNUSED_PARAM, ch return EXIT_SUCCESS; } - len = (flags & OPT_s) ? xatoul_range(size, 2, INT_MAX) : 16384; + len = (flags & OPT_s) ? xatoul_range(size, 2, INT_MAX) : kernel_ringbuffer_size(); buf = xmalloc(len); len = klogctl(3 + (flags & OPT_c), buf, len); if (len < 0)
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor