Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.openwrt.org/project/libubox.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-12-13utils: simplify mkdir_p boolean conditionsRui Salvaterra
Just a trivial simplification. Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
2020-12-13utils: introduce mkdir_pDaniel Golle
Add new utility function mkdir_p(char *path, mode_t mode) to replace the partially buggy implementations found accross fstools and procd. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2018-02-11libubox: Plug a small memory leak.Rosen Penev
va_end was not called if calloc fails. Signed-off-by: Rosen Penev <rosenp@gmail.com>
2017-02-24libubox: Change calloc_a() to return size_t aligned pointersTed Hess
Un-aligned pointers were causing seg faults on some targets Signed-off-by: Ted Hess <thess@kitschensync.net>
2017-01-20utils: fix build on Mac OS X 10.12Felix Fietkau
clock_gettime and CLOCK_MONOTONIC are supported now Signed-off-by: Felix Fietkau <nbd@nbd.name>
2016-12-29utils: add helper functions useful for allocating a ring bufferFelix Fietkau
This creates a mapping with twice the size of the allocated memory. The second half of that mapping points at the same memory as the first half. This is useful for ring buffers, because any read starting in the first half can overflow into the second half as long as the read size is smaller than the size of the memory area. Signed-off-by: Felix Fietkau <nbd@nbd.name>
2016-06-26Fix various memory management issuesMatthias Schiffer
Consistently handle allocation failures. Some functions are changed to return bool or int instead of void to allow returning an error. Also fix a buffer size miscalculation in lua/uloop and use _exit() instead of exit() on errors after forking. Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
2015-01-21utils: use clock_get_time() for clock_gettime() on Apple.Yousong Zhou
It turns out that mach_absolute_time() is not monotonic at all. While at it, convert the CLOCK_REALTIME implementation to using clock_get_time() as well. Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2013-01-06uloop: add a clock_gettime() implementation for mac os xFelix Fietkau
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2012-12-31add utils.c, containing a calloc-like function to allocate multiple chunks ↵Felix Fietkau
with different sizes in one block and return pointers Signed-off-by: Felix Fietkau <nbd@openwrt.org>