MFC r326185: Set errno to EFTYPE instead of EINVAL to be more consistentwith the rest of code.
MFC r267887:Correct buffer size.Submitted by: Sascha Wildner <swildner dragonflybsd org>