[PATCH v2 1/8] cmd/mem.c: use memmove in do_mem_cp()

Tom Rini trini at konsulko.com
Wed Jan 17 15:26:33 CET 2024


On Wed, Jan 03, 2024 at 11:47:03AM +0100, Rasmus Villemoes wrote:

> There's no 'mv' shell command for handling overlapping src and dst
> regions, and there's no point introducing one, when we can just make
> the existing 'cp' command DTRT in all cases. memmove() should at most
> be a few instructions more then memcpy() (to detect the appropriate
> direction to do the copy), which is of course completely in the noise
> with all the string processing that a shell command does.
> 
> Reviewed-by: Simon Glass <sjg at chromium.org>
> Signed-off-by: Rasmus Villemoes <rasmus.villemoes at prevas.dk>

For the series, applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20240117/82d3ac10/attachment.sig>


More information about the U-Boot mailing list