Commit graph

9 commits

Author SHA1 Message Date
Warner Losh 3e15b01d69 libsa: Remove redundant sys/cdefs.h
Sponsored by:		Netflix
2024-02-22 09:31:57 -07:00
Warner Losh 1d386b48a5 Remove $FreeBSD$: one-line .c pattern
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
2023-08-16 11:54:42 -06:00
Simon J. Gerraty ed19b7c525 zalloc_malloc:Free hexdump preceeding buffer when we detect overflow
Move hexdump from stand/common/misc.c to stand/libsa/hexdump.c
(svn cp)
Disable use of pager - causes linking issue for boot1
can be re-enabled by defining HEXDUMP_PAGER.

Reviewed by:	stevek, imp
MFC after:	1 week
Sponsored by:	Juniper Networks
Differential Revision: https://reviews.freebsd.org/D26235
2020-08-29 21:05:43 +00:00
Toomas Soome d6b090d1d4 loader: revert r352421
As insisted by kib, malloc(0) is quite legal.
2019-09-17 16:16:46 +00:00
Toomas Soome 11db1a1654 loader: add memalign() to libsa
Implement memalign(size_t alignment, size_t size) to allocate aligned memory.
2019-09-17 13:15:27 +00:00
Toomas Soome e57c0c2afb loader: cstyle cleanup libsa zalloc sources
Clean up libstand zalloc* sources. Note that it is not 100% whitespace cleanup.
I also reduced block in znalloc and zfree as those were obvious simplifications
and did help to save one level of indent.
2019-09-17 11:35:53 +00:00
Toomas Soome 144c4ca039 loader: factor out guard location setup from Realloc
To simplify and make it easier to read, use ga_Bytes field from guard
structure.
2019-09-17 09:47:35 +00:00
Toomas Soome 41e2c61669 loader: Malloc(0) should return NULL.
We really should not allocate anything with size 0.
2019-09-16 20:28:08 +00:00
Warner Losh ca987d4641 Move sys/boot to stand. Fix all references to new location
Sponsored by:	Netflix
2017-11-14 23:02:19 +00:00
Renamed from sys/boot/libsa/zalloc_malloc.c (Browse further)