Re: [PATCH v2] rust: bindings: rename const binding using sed

From: Benno Lossin
Date: Mon Nov 06 2023 - 17:17:05 EST


On 04.11.23 15:56, Gary Guo wrote:
> diff --git a/rust/Makefile b/rust/Makefile
> index a27f35f924ec..57f7f5e5a95d 100644
> --- a/rust/Makefile
> +++ b/rust/Makefile
> @@ -337,6 +337,8 @@ quiet_cmd_bindgen = BINDGEN $@
>
> $(obj)/bindings/bindings_generated.rs: private bindgen_target_flags = \
> $(shell grep -Ev '^#|^$$' $(srctree)/$(src)/bindgen_parameters)
> +$(obj)/bindings/bindings_generated.rs: private bindgen_target_extra = ; \
> + sed -Ei 's/pub const RUST_CONST_HELPER_([a-zA-Z0-9_]*)/pub const \1/g' $@

I think I mentioned this before, but I think this should use `^`
to ensure that this is only replaced at the beginning of lines.

--
Cheers,
Benno