All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Richard Purdie" <richard.purdie@linuxfoundation.org>
To: Yann Dirson <yann.dirson@blade-group.com>,
	 openembedded-core@lists.openembedded.org
Cc: Yann Dirson <yann@blade-group.com>
Subject: Re: [OE-core] [PATCH] rngd: fix --debug to also filter syslog() calls
Date: Fri, 09 Oct 2020 14:00:02 +0100	[thread overview]
Message-ID: <9993e144fbf35c6b3231108bc7b23f8ff92b5246.camel@linuxfoundation.org> (raw)
In-Reply-To: <20201009085527.1993257-1-yann@blade-group.com>

On Fri, 2020-10-09 at 10:55 +0200, Yann Dirson wrote:
> From: Yann Dirson <yann@blade-group.com>
> 
> Debug logs were only controlled by --debug flag while in --foreground mode.
> In --daemon mode (the default for us) /var/log/message got stuffed with
> details of entropy pool refilling, which is useless in production, and
> hamful when log rotation then gets rid of the more useful logs.
> 
> This change makes the two modes consistently only produce debug logs when
> --debug is specified.
> 
> Signed-off-by: Yann Dirson <yann@blade-group.com>
> ---
>  .../rng-tools/rngd-debug-filter.patch         | 22 +++++++++++++++++++
>  .../rng-tools/rng-tools_6.10.bb               |  1 +
>  2 files changed, 23 insertions(+)
>  create mode 100644 meta/recipes-support/rng-tools/rng-tools/rngd-debug-filter.patch
> 
> diff --git a/meta/recipes-support/rng-tools/rng-tools/rngd-debug-filter.patch b/meta/recipes-support/rng-tools/rng-tools/rngd-debug-filter.patch
> new file mode 100644
> index 0000000000..320f0257e6
> --- /dev/null


This patch has no description, author or Upstream-Status: information
in it. It needs such information to be considered. It would be helpful
if the change was submitted upstream too, not sure if you've looked at
that? We try not to carry patches if we can.

Cheers,

Richard

> +++ b/meta/recipes-support/rng-tools/rng-tools/rngd-debug-filter.patch
> @@ -0,0 +1,22 @@
> +Index: git/rngd.h
> +===================================================================
> +--- git.orig/rngd.h
> ++++ git/rngd.h
> +@@ -145,13 +145,13 @@ extern bool quiet;
> + #define message(priority,fmt,args...) do { \
> + 	if (quiet) \
> + 		break;\
> ++	if (arguments->debug == false && LOG_PRI(priority) == LOG_DEBUG) \
> ++		break;\
> + 	if (am_daemon) { \
> + 		syslog((priority), fmt, ##args); \
> + 	} else if (!msg_squash) { \
> +-		if ((LOG_PRI(priority) != LOG_DEBUG) || (arguments->debug == true)) {\
> +-			fprintf(stderr, fmt, ##args); \
> +-			fflush(stderr); \
> +-		} \
> ++		fprintf(stderr, fmt, ##args); \
> ++		fflush(stderr); \
> + 	} \
> + } while (0)
> + 
> diff --git a/meta/recipes-support/rng-tools/rng-tools_6.10.bb b/meta/recipes-support/rng-tools/rng-tools_6.10.bb
> index 3f9720e406..98fb7aa775 100644
> --- a/meta/recipes-support/rng-tools/rng-tools_6.10.bb
> +++ b/meta/recipes-support/rng-tools/rng-tools_6.10.bb
> @@ -12,6 +12,7 @@ SRC_URI = "\
>      git://github.com/nhorman/rng-tools.git \
>      file://a4b6d9ce64f132e463b9091d0536913ddaf11516.patch \
>      file://dab16a5fd4efde8ef569b358e19b1fcbc7d0d938.patch \
> +    file://rngd-debug-filter.patch \
>      file://init \
>      file://default \
>      file://rngd.service \
> 
> 


  reply	other threads:[~2020-10-09 13:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-09  8:55 [PATCH] rngd: fix --debug to also filter syslog() calls Yann Dirson
2020-10-09 13:00 ` Richard Purdie [this message]
2020-10-09 14:19   ` [OE-core] " Yann Dirson
2020-10-09 15:21     ` Richard Purdie

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9993e144fbf35c6b3231108bc7b23f8ff92b5246.camel@linuxfoundation.org \
    --to=richard.purdie@linuxfoundation.org \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=yann.dirson@blade-group.com \
    --cc=yann@blade-group.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.