mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-12-25 12:33:41 +00:00
67bc59df05
When passing a data buffer back from a function, it is not always clear who owns the buffer, i.e. who is responsible for freeing the memory used. An example of this is where multiple files are decompressed from the firmware image, using a temporary buffer for reading (since the compressed data has to live somewhere) and producing a temporary or permanent buffer with the resuilts. Where the firmware image can be memory-mapped, as on x86, the compressed data does not need to be buffered, but the complexity of having a buffer which is either allocated or not, makes the code hard to understand. Introduce a new 'abuf' which supports simple buffer operations: - encapsulating a buffer and its size - either allocated with malloc() or not - able to be reliably freed if necessary - able to be converted to an allocated buffer if needed This simple API makes it easier to deal with allocated and memory-mapped buffers. Signed-off-by: Simon Glass <sjg@chromium.org>
21 lines
643 B
Makefile
21 lines
643 B
Makefile
# SPDX-License-Identifier: GPL-2.0+
|
|
#
|
|
# (C) Copyright 2018
|
|
# Mario Six, Guntermann & Drunck GmbH, mario.six@gdsys.cc
|
|
obj-y += cmd_ut_lib.o
|
|
obj-y += abuf.o
|
|
obj-$(CONFIG_EFI_LOADER) += efi_device_path.o
|
|
obj-$(CONFIG_EFI_SECURE_BOOT) += efi_image_region.o
|
|
obj-y += hexdump.o
|
|
obj-y += lmb.o
|
|
obj-y += longjmp.o
|
|
obj-$(CONFIG_CONSOLE_RECORD) += test_print.o
|
|
obj-$(CONFIG_SSCANF) += sscanf.o
|
|
obj-y += string.o
|
|
obj-y += strlcat.o
|
|
obj-$(CONFIG_ERRNO_STR) += test_errno_str.o
|
|
obj-$(CONFIG_UT_LIB_ASN1) += asn1.o
|
|
obj-$(CONFIG_UT_LIB_RSA) += rsa.o
|
|
obj-$(CONFIG_AES) += test_aes.o
|
|
obj-$(CONFIG_GETOPT) += getopt.o
|
|
obj-$(CONFIG_UT_LIB_CRYPT) += test_crypt.o
|