lkml.org 
[lkml]   [2001]   [Apr]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: Config printk buffer size
Date

"Thomas Dodd wrote:"
> diff -u --new-file --recursive linux-2.4.3-ac2.orig/kernel/printk.c linux-2.4.3-ac2/kernel/printk.c
> --- linux-2.4.3-ac2.orig/kernel/printk.c Wed Apr 4 15:23:31 2001
> +++ linux-2.4.3-ac2/kernel/printk.c Wed Apr 4 16:01:28 2001
> @@ -27,7 +27,7 @@
>
> #include <asm/uaccess.h>
>
> -#define LOG_BUF_LEN (16384) /* This must be a power of two */
> +#define LOG_BUF_LEN (CONFIG_PRINTK_BUF_LEN*1024) /* This must be a power of two */
> #define LOG_BUF_MASK (LOG_BUF_LEN-1)
>

IMO, it would be nice to add a test here whether the CONFIG_PRINTK_BUF_LEN
value is really set as a power of two, eg.:

#if (LOG_BUF_LEN & LOG_BUF_MASK)
#error CONFIG_PRINTK_BUF_LEN must be a power of two
#endif

(above works with egcs-2.91.66)

Andrzej
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:24    [W:0.038 / U:6.888 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site