lkml.org 
[lkml]   [2014]   [Feb]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 2/8] security: apparmor: Use a more current logging style
From
Date
On Tue, 2014-02-25 at 23:31 -0800, John Johansen wrote:
> On 02/24/2014 01:59 PM, Joe Perches wrote:
> > Convert printks to pr_<level>.
> > Add pr_fmt.
> > Coalesce formats.
> > Remove embedded prefixes from logging.
> >
>
> you missed one place,

No, not really.

pr_debug differs from printk(KERN_DEBUG in that
pr_debug is only enabled with a #define DEBUG
or CONFIG_DYNAMIC_DEBUG setting.

I did not want to convert any of the printks
with KERN_DEBUG in this pass as that would
change the message logging by requiring
dynamic debugging be included in the CONFIG.

A subsequent pass converting these uses will
be done if or after these initial patches are
applied.

thanks, Joe

> --- a/security/apparmor/include/apparmor.h
> +++ b/security/apparmor/include/apparmor.h
> @@ -50,7 +50,7 @@ extern unsigned int aa_g_path_max;
> #define AA_DEBUG(fmt, args...) \
> do { \
> if (aa_g_debug && printk_ratelimit()) \
> - printk(KERN_DEBUG "AppArmor: " fmt, ##args); \
> + pr_debug(fmt, ##args); \
> } while (0)
>
> #define AA_ERROR(fmt, args...) \
>
> other than that looks good.
>
> > Signed-off-by: Joe Perches <joe@perches.com>
> Acked-by: John Johansen <john.johansen@canonical.com>




\
 
 \ /
  Last update: 2014-02-26 16:21    [W:0.293 / U:0.296 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site