]> git.baikalelectronics.ru Git - uboot.git/commit
cmd: fdt: Fix fdt rm behavior on non-existent property and error message space
authorMarek Vasut <marek.vasut+renesas@mailbox.org>
Thu, 2 Mar 2023 03:08:16 +0000 (04:08 +0100)
committerSimon Glass <sjg@chromium.org>
Thu, 9 Mar 2023 16:50:47 +0000 (08:50 -0800)
commitb1aef0d4345e85cfcdd709262e5cc7a24b6ba181
treea3c8729fb0acda5022566bb04760743d5dc54d07
parent1687647178c252b1c115fb123b6eab83630a3382
cmd: fdt: Fix fdt rm behavior on non-existent property and error message space

In case an FDT contains a node '/test-node@1234' , with no property
called 'noprop' in that node, the following command triggers a print
of help message for 'fdt' command instead of erroring out:
=> fdt rm /test-node@1234 noprop
This is because the subcommand errornously returns 'err' instead of
CMD_RET_FAILURE, fix it. Furthermore, align the number of spaces past
fdt_delprop() in error message with the rest of the code.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
cmd/fdt.c