linux-user: don't short-circuit read with zero length
A zero-length read still needs to do the usual checks, thus it may return errors like EBADF. This makes the read syscall emulation consistent with the pread64 syscall emulation. Signed-off-by: NAndreas Schwab <schwab@suse.de> Reviewed-by: NLaurent Vivier <laurent@vivier.eu> Message-Id: <mvm5zsxz2we.fsf@suse.de> Signed-off-by: NLaurent Vivier <laurent@vivier.eu>
Showing
想要评论请 注册 或 登录