Same semantics as Linux: returns the string length without the NUL, count if the string was truncated, or -EFAULT. Implemented with copyinstr(9). Unlike linux_copyin() it does not translate the remapped ioctl argument window; its user, drm/virtio, passes a pointer taken from the ioctl payload, so that is not needed.
Details
Details
- Reviewers
wulf manu - Commits
- rG59642e07f427: linuxkpi: add strncpy_from_user()
Built on main with this applied: linuxkpi, linuxkpi_wlan, mlx5, iwlwifi and ath10k for aarch64 and amd64, and drm-kmod's virtio-gpu (freebsd/drm-kmod#517) without its interim copy of this function.
Diff Detail
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Skipped - Unit
Tests Skipped