From 6dfcf73e0cf2f3695eda676713c463ed3eae725b Mon Sep 17 00:00:00 2001 From: Vedanth Padmaraman Date: Sat, 24 Feb 2024 16:02:53 +0530 Subject: [PATCH] Use a different separator for sed 's' command The sed expression that is used to set specific config values doesn't work while trying to set the following config: CONFIG_ANDROID_BINDER_DEVICES="binder,hwbinder,vndbinder,anbox-binder,anbox-hwbinder,anbox-vndbinder" Instead, it throws the following error: sed: -e expression #1, char 80: unknown option to `s' This is because the argument separator (comma) also appears in the expression argument itself. That causes sed to interpret the 'h' in 'binder,hwbinder' as an option to the 's' command. This change makes semicolon (;) the separator instead of comma (,) to avoid the issue. If a new config value with a semicolon in it is ever added to the list in $CONFIGS_EQ, this will have to be changed. --- check-kernel-config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/check-kernel-config b/check-kernel-config index 8380cc1..652eda4 100755 --- a/check-kernel-config +++ b/check-kernel-config @@ -344,7 +344,7 @@ for c in $CONFIGS_EQ;do ered "$lhs is set, but to $cur not $rhs." if $write ; then egreen "Setting $c correctly" - sed -i 's,^'"$lhs"'.*,# '"$lhs"' was '"$cur"'\n'"$c"',' "$FILE" + sed -i 's;^'"$lhs"'.*;# '"$lhs"' was '"$cur"'\n'"$c"';' "$FILE" fixes=$((fixes+1)) fi else