coreboot/tests/commonlib
Yu-Ping Wu 89048780c0 commonlib/list: Add list_move()
This function transfers all elements from one list head to another. The
The destination list head takes ownership of all nodes from the source
list head. The source list head is reinitialized to an empty list.

This is useful for efficiently moving list contents without element-wise
relinking, particularly in contexts like device tree overlay application
where node structures are incorporated from a temporary tree.

BUG=b:434080284
TEST=emerge-rauru coreboot libpayload
BRANCH=none

Change-Id: I143394e381fa72bcba692b7727f57dfc09fda70e
Signed-off-by: Yu-Ping Wu <yupingso@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/91557
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Jakub "Kuba" Czapiga <czapiga@google.com>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
Reviewed-by: Julius Werner <jwerner@chromium.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
2026-03-07 01:18:39 +00:00
..
bsd commonlib/bsd/string: Fix pointer overflow for strnlen() 2024-08-15 18:16:23 +00:00
device_tree-test.c treewide: Move device_tree to commonlib 2024-06-22 04:02:04 +00:00
list-test.c commonlib/list: Add list_move() 2026-03-07 01:18:39 +00:00
Makefile.mk treewide: Move device_tree to commonlib 2024-06-22 04:02:04 +00:00
rational-test.c tests/commonlib/rational-test: Use test group runner wrapper 2022-09-07 22:24:31 +00:00
region-test.c region: Turn region_end() into an inclusive region_last() 2024-08-23 01:08:16 +00:00