#ifndef STR_H #define STR_H #include "built_in.h" extern size_t strlcpy(char *dest, const char *src, size_t size); extern int slprintf(char *dst, size_t size, const char *fmt, ...) __check_format_printf(3, 4); extern int slprintf_nocheck(char *dst, size_t size, const char *fmt, ...); extern char *strtrim_right(char *p, char c); extern noinline void *xmemset(void *s, int c, size_t n); extern char *argv2str(int startind, int argc, char **argv); #endif /* STR_H */ t Git repository'/>
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Brezillon <boris.brezillon@free-electrons.com>2016-09-16 16:59:26 +0200
committerRichard Weinberger <richard@nod.at>2016-10-02 22:48:14 +0200
commit3291b52f9ff0acc80a8ee3f92a960db937dccecb (patch)
treed781fc235723086fe4e07a3f30d2147d56a4aa0b
parent799dca34ac543485f581bd8464ec9b1c4f0f852a (diff)
UBI: introduce the VID buffer concept
Currently, all VID headers are allocated and freed using the ubi_zalloc_vid_hdr() and ubi_free_vid_hdr() function. These functions make sure to align allocation on ubi->vid_hdr_alsize and adjust the vid_hdr pointer to match the ubi->vid_hdr_shift requirements. This works fine, but is a bit convoluted. Moreover, the future introduction of LEB consolidation (needed to support MLC/TLC NANDs) will allows a VID buffer to contain more than one VID header. Hence the creation of a ubi_vid_io_buf struct to attach extra information to the VID header. We currently only store the actual pointer of the underlying buffer, but will soon add the number of VID headers contained in the buffer. Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: Richard Weinberger <richard@nod.at>