diff options
author | Vladimir Kondratyev <wulf@FreeBSD.org> | 2021-07-05 00:20:42 +0000 |
---|---|---|
committer | Vladimir Kondratyev <wulf@FreeBSD.org> | 2021-07-05 00:20:42 +0000 |
commit | 019391bf852771070cb739900f9e20ae6c41c746 (patch) | |
tree | 807246fb56bd6578050ef1abeb980f5164c426ff /sys/compat/linuxkpi/common/include/linux/inetdevice.h | |
parent | 98a6984a9e10c5c1677643eb4d9a758e3af131da (diff) | |
download | src-019391bf852771070cb739900f9e20ae6c41c746.tar.gz src-019391bf852771070cb739900f9e20ae6c41c746.zip |
LinuxKPI: Implement strscpy
strscpy copies the src string, or as much of it as fits, into the dst
buffer. The dst buffer is always NUL terminated, unless it's zero-sized.
strscpy returns the number of characters copied (not including the
trailing NUL) or -E2BIG if len is 0 or src was truncated.
Currently drm-kmod replaces strscpy with strncpy that is not quite
correct as strncpy does not NUL-terminate truncated strings and returns
different values on exit.
Reviewed by: hselasky, imp, manu
MFC after: 2 weeks
Differential revision: https://reviews.freebsd.org/D31005
Diffstat (limited to 'sys/compat/linuxkpi/common/include/linux/inetdevice.h')
0 files changed, 0 insertions, 0 deletions