All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Horman <horms@kernel.org>
To: Mason Rocha <mrocha@turretllc.us>
Cc: kexec@lists.infradead.org
Subject: Re: [PATCH kexec-tools 2/2] kexec/ifdown.c: Hide error if sockets are disabled
Date: Tue, 11 Nov 2025 13:39:03 +0000	[thread overview]
Message-ID: <aRM8dwyYJSYdsqri@horms.kernel.org> (raw)
In-Reply-To: <20251022020703.14200-4-mrocha@turretllc.us>

On Tue, Oct 21, 2025 at 09:07:04PM -0500, Mason Rocha wrote:
> Prevents the message "Function not implemented" from being logged when
> a system with networking support disabled, as there couldn't possibly be
> any interfaces to bring down to the point where we need to make sure the
> user knows that the interfaces were not brought down.
> 
> Signed-off-by: Mason Rocha <mrocha@turretllc.us>
> ---
>  kexec/ifdown.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/kexec/ifdown.c b/kexec/ifdown.c
> index 6a60bcb..e6ea0ae 100644
> --- a/kexec/ifdown.c
> +++ b/kexec/ifdown.c
> @@ -32,8 +32,10 @@ int ifdown(void)
>  	int fd, shaper;
>  
>  	if ((fd = socket(AF_NETLINK, SOCK_DGRAM, 0)) < 0) {
> -		fprintf(stderr, "ifdown: ");
> -		perror("socket");
> +		if(errno != ENOSYS) {

nit: I'd prefer a space between 'if' and '('

     I added one when applying this series.

> +			fprintf(stderr, "ifdown: ");
> +			perror("socket");
> +		}
>  		goto error;
>  	}
>  
> -- 
> 2.51.0
> 


  reply	other threads:[~2025-11-11 13:39 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-22  2:07 [PATCH kexec-tools 0/2] kexec/ifdown.c: minimise errors printed Mason Rocha
2025-10-22  2:07 ` [PATCH kexec-tools 1/2] kexec/ifdown.c: Use AF_NETLINK instead of AF_INET Mason Rocha
2025-10-22  2:07 ` [PATCH kexec-tools 2/2] kexec/ifdown.c: Hide error if sockets are disabled Mason Rocha
2025-11-11 13:39   ` Simon Horman [this message]
2025-11-11 13:38 ` [PATCH kexec-tools 0/2] kexec/ifdown.c: minimise errors printed Simon Horman

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=aRM8dwyYJSYdsqri@horms.kernel.org \
    --to=horms@kernel.org \
    --cc=kexec@lists.infradead.org \
    --cc=mrocha@turretllc.us \
    /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.