public inbox for linux-kernel-mentees@lists.linux-foundation.org
 help / color / mirror / Atom feed
From: "Ricardo B. Marlière" <ricardo@marliere.net>
To: <ritvikfoss@gmail.com>, <linux-kernel@vger.kernel.org>
Cc: <skhan@linuxfoundation.org>,
	<linux-kernel-mentees@lists.linuxfoundation.org>
Subject: Re: [PATCH] scripts/checksyscalls.sh: Add usage message, fix -Wno-error
Date: Thu, 20 Feb 2025 08:52:14 -0300	[thread overview]
Message-ID: <D7X92MYPURFI.1BHED9UW00I82@marliere.net> (raw)
In-Reply-To: <20250220105940.5241-1-ritvikfoss@gmail.com>

On Thu Feb 20, 2025 at 7:59 AM -03, ritvikfoss wrote:
> From: Ritvik Gupta <ritvikfoss@gmail.com>
>
> Currently 'scripts/checksyscalls.sh' does not
> provide guidance when executed without specifying
> a compiler, instead it attempts to execute
> '-Wno-error' parameter as a command,
> resulting in 'Wno-error: Command not found' error.
>
> This patch adds a usage message that is displayed
> when no compiler is provided as parameter to
> improve clarity.
>
> Signed-off-by: Ritvik Gupta <ritvikfoss@gmail.com>
> ---
>  scripts/checksyscalls.sh | 15 +++++++++++++++
>  1 file changed, 15 insertions(+)
>
> diff --git a/scripts/checksyscalls.sh b/scripts/checksyscalls.sh
> index 1e5d2eeb726d..14c04227c96e 100755
> --- a/scripts/checksyscalls.sh
> +++ b/scripts/checksyscalls.sh
> @@ -10,6 +10,21 @@
>  # checksyscalls.sh gcc gcc-options
>  #
>  
> +usage() {
> +cat <<EOF
> +Usage: $0 <compiler> [compiler-options]
> +
> +Example:
> +  $0 gcc
> +EOF
> +exit 1
> +}
> +
> +if [[ $# -eq 0 ]]; then

[[ is bash, while this script is POSIX #!/bin/sh

> +	echo "Error: No compiler provided."
> +	usage
> +fi
> +
>  ignore_list() {
>  cat << EOF
>  #include <asm/types.h>


  reply	other threads:[~2025-02-20 11:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-20 10:59 [PATCH] scripts/checksyscalls.sh: Add usage message, fix -Wno-error ritvikfoss
2025-02-20 11:52 ` Ricardo B. Marlière [this message]
2025-02-20 15:14 ` [PATCH v2] " ritvikfoss

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=D7X92MYPURFI.1BHED9UW00I82@marliere.net \
    --to=ricardo@marliere.net \
    --cc=linux-kernel-mentees@lists.linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ritvikfoss@gmail.com \
    --cc=skhan@linuxfoundation.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox