lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <D7X92MYPURFI.1BHED9UW00I82@marliere.net>
Date: Thu, 20 Feb 2025 08:52:14 -0300
From: Ricardo B. Marlière <ricardo@...liere.net>
To: <ritvikfoss@...il.com>, <linux-kernel@...r.kernel.org>
Cc: <skhan@...uxfoundation.org>,
 <linux-kernel-mentees@...ts.linuxfoundation.org>
Subject: Re: [PATCH] scripts/checksyscalls.sh: Add usage message, fix
 -Wno-error

On Thu Feb 20, 2025 at 7:59 AM -03, ritvikfoss wrote:
> From: Ritvik Gupta <ritvikfoss@...il.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@...il.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>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ