/* * netsniff-ng - the packet sniffing beast * Copyright 2009, 2010 Daniel Borkmann. * Subject to the GPL, version 2. */ #include #include #include #include "str.h" size_t strlcpy(char *dest, const char *src, size_t size) { size_t ret = strlen(src); if (size) { size_t len = (ret >= size) ? size - 1 : ret; memcpy(dest, src, len); dest[len] = '\0'; } return ret; } static inline int vslprintf(char *dst, size_t size, const char *fmt, va_list ap) { int ret; ret = vsnprintf(dst, size, fmt, ap); dst[size - 1] = '\0'; return ret; } int slprintf(char *dst, size_t size, const char *fmt, ...) { int ret; va_list ap; va_start(ap, fmt); ret = vslprintf(dst, size, fmt, ap); va_end(ap); return ret; } int slprintf_nocheck(char *dst, size_t size, const char *fmt, ...) { int ret; va_list ap; va_start(ap, fmt); ret = vslprintf(dst, size, fmt, ap); va_end(ap); return ret; } noinline void *xmemset(void *s, int c, size_t n) { size_t i; uint8_t *ptr = s; for (i = 0; i < n; ++i) ptr[i] = (uint8_t) c; return ptr; } char *strtrim_right(char *p, char c) { char *end; size_t len; len = strlen(p); while (*p && len) { end = p + len - 1; if (c == *end) *end = 0; else break; len = strlen(p); } return p; } ket-rx-pump-back'>packet-rx-pump-back net-next plumbingsTobias Klauser
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Agner <stefan@agner.ch>2016-04-04 22:28:40 -0700
committerShawn Guo <shawnguo@kernel.org>2016-04-13 17:42:47 +0800
commit77f0862d0d6874a73f83032b7ffd6d204fc8646c (patch)
treeaf6518c20dc03e29144880e0e7f54fb990d3d530 /Documentation
parent1d0fc33f4666f1bd29990f154767aa5d374c9e19 (diff)
ARM: dts: vf610-colibri: enable display controller
Enable dcu node which is used by the DCU DRM driver. Assign the 5.7" EDT panel with VGA resolution which Toradex sells often with the evaluation board. Signed-off-by: Stefan Agner <stefan@agner.ch> Signed-off-by: Shawn Guo <shawnguo@kernel.org>
Diffstat (limited to 'Documentation')