u-boot/doc/usage
Massimiliano Minella 4c73630686 cmd: setexpr: fix no matching string in gsub return empty value
In gsub, when the destination string is empty, the string 't' is
provided and the regular expression doesn't match, then the final result
is an empty string.

Example:

=> echo ${foo}

=> setenv foo
=> setexpr foo gsub e a bar
=> echo ${foo}

=>

The variable ${foo} should contain "bar" and the lack of match shouldn't
be considered an error.

This patch fixes the erroneous behavior by removing the return
statement and breaking out of the loop in case of lack of match.

Also add a test for the no match case.

Signed-off-by: Massimiliano Minella <massimiliano.minella@se.com>
2024-03-02 12:26:19 -05:00
..
cmd cmd: setexpr: fix no matching string in gsub return empty value 2024-03-02 12:26:19 -05:00
fit rsa: use pkcs11 uri as defined in rfc7512 2023-12-20 09:48:17 -05:00
os doc: usage: Convert README.plan9 to reST 2022-03-31 19:06:16 +02:00
blkmap.rst doc: harmonize Linux kernel documentation links 2023-07-09 04:00:06 +02:00
cmdline.rst doc: man-page for the env command 2022-04-15 11:23:02 +02:00
dfu.rst doc: dfu: fix a handful of typos 2024-01-17 08:40:19 +01:00
environment.rst boot: add support for button commands 2024-02-13 15:38:49 -05:00
fdt_overlays.rst doc: use .dtso as extension for device tree overlay sources 2023-10-11 13:22:32 -04:00
index.rst doc: man-page for smbios command 2024-01-26 14:15:08 +01:00
measured_boot.rst doc: shorten overlong title underlines 2023-11-11 01:44:08 +01:00
netconsole.rst global: Finish CONFIG -> CFG migration 2023-01-20 12:27:24 -05:00
partitions.rst blk: Rename if_type to uclass_id 2022-09-25 08:30:05 -06:00
semihosting.rst global: Use proper project name U-Boot (next2) 2023-09-21 13:20:11 +02:00
spl_boot.rst doc: describe TPL/VPL/SPL boot 2023-08-27 08:21:08 +02:00