[PATCH v1 3/4] scripts/config: add -y|-n flags

dmukhin@xen.org posted 4 patches 1 week, 3 days ago
[PATCH v1 3/4] scripts/config: add -y|-n flags
Posted by dmukhin@xen.org 1 week, 3 days ago
From: Denis Mukhin <dmukhin@ford.com> 

Add alias -y ("yes") to --enable and -n ("no") to --disable a Kconfig
option for better scripting experience.

Signed-off-by: Denis Mukhin <dmukhin@ford.com>
---
 xen/scripts/config | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/xen/scripts/config b/xen/scripts/config
index 1050812aae8d..1ede964320cf 100755
--- a/xen/scripts/config
+++ b/xen/scripts/config
@@ -16,8 +16,8 @@ Manipulate options in a .config file from the command line.
 Usage:
 $myname options command ...
 commands:
-	--enable|-e option   Enable option
-	--disable|-d option  Disable option
+	--enable|-e|-y|--yes    option   Enable option
+	--disable|-d|-n|--no    option   Disable option
 	--set-str option string
 	                     Set option to "string"
 	--set-val option value
@@ -166,11 +166,11 @@ while [ "$1" != "" ] ; do
 		;;
 	esac
 	case "$CMD" in
-	--enable|-e)
+	--enable|-e|-y|--yes)
 		set_var "${CONFIG_}$ARG" "${CONFIG_}$ARG=y"
 		;;
 
-	--disable|-d)
+	--disable|-d|-n|--no)
 		set_var "${CONFIG_}$ARG" "# ${CONFIG_}$ARG is not set"
 		;;
 
-- 
2.52.0
Re: [PATCH v1 3/4] scripts/config: add -y|-n flags
Posted by Stefano Stabellini 2 days, 7 hours ago
On Thu, 15 Jan 2026, dmukhin@xen.org wrote:
> From: Denis Mukhin <dmukhin@ford.com> 
> 
> Add alias -y ("yes") to --enable and -n ("no") to --disable a Kconfig
> option for better scripting experience.
> 
> Signed-off-by: Denis Mukhin <dmukhin@ford.com>

Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>


> ---
>  xen/scripts/config | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/xen/scripts/config b/xen/scripts/config
> index 1050812aae8d..1ede964320cf 100755
> --- a/xen/scripts/config
> +++ b/xen/scripts/config
> @@ -16,8 +16,8 @@ Manipulate options in a .config file from the command line.
>  Usage:
>  $myname options command ...
>  commands:
> -	--enable|-e option   Enable option
> -	--disable|-d option  Disable option
> +	--enable|-e|-y|--yes    option   Enable option
> +	--disable|-d|-n|--no    option   Disable option
>  	--set-str option string
>  	                     Set option to "string"
>  	--set-val option value
> @@ -166,11 +166,11 @@ while [ "$1" != "" ] ; do
>  		;;
>  	esac
>  	case "$CMD" in
> -	--enable|-e)
> +	--enable|-e|-y|--yes)
>  		set_var "${CONFIG_}$ARG" "${CONFIG_}$ARG=y"
>  		;;
>  
> -	--disable|-d)
> +	--disable|-d|-n|--no)
>  		set_var "${CONFIG_}$ARG" "# ${CONFIG_}$ARG is not set"
>  		;;
>  
> -- 
> 2.52.0
>