[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox
Subject:    [PATCH] dmesg: do not truncate output
From:       Jan Klötzke <jan () kloetzke ! net>
Date:       2023-06-18 9:15:31
Message-ID: 20230618091531.176121-1-jan () kloetzke ! net
[Download RAW message or body]

The kernel log buffer can be configured to be bigger than 16 MiB. As the
user expects to see all available logs, do not arbitrarily constrain the
buffer size.

Signed-off-by: Jan Klötzke <jan@kloetzke.net>
---
 util-linux/dmesg.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/util-linux/dmesg.c b/util-linux/dmesg.c
index 6670b84de..9b2fba22d 100644
--- a/util-linux/dmesg.c
+++ b/util-linux/dmesg.c
@@ -81,8 +81,6 @@ int dmesg_main(int argc UNUSED_PARAM, char **argv)
 		len = klogctl(10, NULL, 0); /* read ring buffer size */
 	if (len < 16*1024)
 		len = 16*1024;
-	if (len > 16*1024*1024)
-		len = 16*1024*1024;
 
 	buf = xmalloc(len);
 	len = klogctl(3 + (opts & OPT_c), buf, len); /* read ring buffer */
-- 
2.39.2

_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic